- Create hotfolder and enable versioningGo to Assets > Settings > HotfoldersFill out the hotfolder information. You can link this to either an internal folder or an external folder. If you link to an internal folder, you don't need to fill out the "External Path" field. You can find out more about Hotfolders here: Hot_Folders Once all of the desired fields have been entered, make sure to check the "Enable Versioning" checkbox, and click "Save" to save the hotfolder.Here's an example for creating an internal Hotfolder for "users"By enabling versioning on a hotfolder, a new property will be added to the file ROOT/WEB-INF/oemounts.xml between the tags.Here is the one created for the example above:
<mount path="/WEB-INF/data/media/catalogs/public/originals/users" repositorytype="versionRepository"/>
- Verify that versioning is enabledUpload an Image...Click on "Upload Media". Select an image asset to upload, and upload it.Alter the Image...For example: rotate the original image (or download the uploaded image and save it with the same filename)Re-upload the Image...Go to the asset's "Attachments" tab in the asset details pane. You may have to click a button titled "Convert this to a folder-based asset"Hover over the "Attachments" folder and click on the "Upload Attachment" icon: Click the "Choose Files" button that pops up and select the image that you just rotated. Make sure that the image has the same filename. Rotate this image again, and re-upload it a third time. Click on the filename within the attachments folder and another button called "View Revisions" should be available. Clicking on this button should display all of the past versions of the asset.
- REST APIHere are some example URLs using REST API calls dealing with versioning:Get Versions: http://demo.entermediasoftware.com/media/services/rest/repository/getversions.xml?editPath=/WEB-INF/data/media/catalogs/public/originals/users/admin/2013/11/flower.jpg/flower.jpgGet Versions will return information about the versions of a particular asset. Restore Version: http://demo.entermediasoftware.com/media/services/rest/repository/restoreversion.xml?editPath=/WEB-INF/data/media/catalogs/public/originals/users/admin/2013/11/test.jpg/test.jpg&assetid=10101&filename=test.jpg&version=1 Restore Version will take an asset and restore it back to a previous version (i.e. 1,2,3,...), specified by the "version" parameter. You can find out more about the EnterMedia REST API here: EnterMedia JSON REST API
EnterMediaDB - Open Source Digital Asset Management