Fórum

Versioning Documents using Document Library API

Anil Kumar, modificado 14 Anos atrás.

Versioning Documents using Document Library API

New Member Postagens: 14 Data de Entrada: 24/07/09 Postagens Recentes
Hi,

I would like to know we can version documents present in the document library using the Liferay API. When we upload documents with the same name through the UI, a new version is created and the earlier versions can be accessed as well.

But when i try to use the API functions such as addFileEntry() or addOrOverwriteFileEntry() presnt in the DLFileEntryLocalServiceUtil class, I am getting "Duplicate File Exception" when i upload the same document the second time round. No versioning of the document is taking place. The upload using the API is working when the file is not present already.

Please let me know how i can achieve this. Do I need to invoke some other functions?

I am really in need of this.

Thanks,
Anil