Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sitefinity: How can you update the revision of a document programmatically?

In Sitefinity, almost everything is able to be revisioned. In the backend interface at a page for a content item you can click on Revision History and see revisions.

enter image description here

We're in a situation where we're manually uploading documents in to the Documents & Files library through a custom form. We're able to do this using the Content Lifecycle which has pretty good documentation: http://www.sitefinity.com/documentation/gettingstarted/developers-guide/sitefinity-essentials/modules/content-lifecycle .

What doesn't have any documentation is how to modify a document so that it updates the revision of that document programmatically, not replace it. Right now, we're only able to replace it and the revision history stays empty.

like image 561
Sam Rueby Avatar asked Nov 22 '25 19:11

Sam Rueby


1 Answers

I think you cannot keep the previous version of the document in Sitefinity. The revision history for the documents keeps track for the metadata only, e.g. Title, Author, etc. If you replace the file, there is no way to revert it back through the Revision History.

Disclaimer: I haven't tested this in the 7+ versions.

like image 69
Veselin Vasilev Avatar answered Nov 25 '25 09:11

Veselin Vasilev