Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
I found out that FrameworkFactoryBase.UpdateEntity(document) actually updates the document entitiy without deleting the real file. And this fits perfectly in my scenario.
Hi,
I'm using the latest version of EPiServer Community - 4.0 I have the folling code:
var clone = (Document)currentDocument.Clone();
clone.Body = "test";
DocumentArchiveHandler.Instance.UpdateDocument(clone);
After the update, however, the file is deleted from the file system. I see that there is an entry in the UpdateDocument method in the DocumentArchiveFactory class which says "File.Delete(document.PhysicalPath)". Why UpdateDocument deletes the file. Is there something which I've missed? How can I update an existing file without the need to readd it?