cancel
Showing results for 
Search instead for 
Did you mean: 

API URL to download pervious versions of an uploaded file

anupam_r_mas
Champ in-the-making
Champ in-the-making
Hi Guys,

I need to download the previous version of an uploaded file on alfresco.
Can anyone suggest me any existing API which can be used for this purpose.
I tried a few but those only gave the latest version of the file.
Need some urgent help..

Thanks.
1 REPLY 1

niketapatel
Star Contributor
Star Contributor
If you have enabled version on content/document then in detail page of document you can see version history. From there you can download previous version of docuent.

For API - check VersionService, you may follow below steps.
1)Get nodeRef of document
2)get its versionHistory (VersionService.getVersionHistory)
3)Generte download URL from requried version using this noderef - version.getFrozenStateNodeRef()

Hope this help