cancel
Showing results for 
Search instead for 
Did you mean: 

Check before upload a file for duplicate entry

sundar3686
Champ in-the-making
Champ in-the-making
Hi friends
i want to check before upload if the file is already exists or not. if its exists means i want to put version or rename the file like share. anybody know how to solve this?
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
Before uploading you have to execute a query to check if this content exists or not.
If you are using Lucene, for example, you have to execute a query similar to the following:

PATH:"/app:company_home/cm:CustomSpace/*" AND @cm\:name:"contentToFindFilename.txt"
If the content exists then you could update the content version otherwise you can upload a new content.

Hope this helps.