cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to determine if a file already exists in the repository?

jkay_
Champ in-the-making
Champ in-the-making

When we create a new document with an attached file, we would like to check whether the file exists and refer the new document's file:content property to the existing blob instead of copying the same file into the repository over and over again. Is there a way to do this?

8 REPLIES 8

bruce_Grant
Elite Collaborator
Elite Collaborator

This is the default behaviour of Nuxeo (VCS). If two binary objects are the exact same then only a single binary will be stored. Effectively, multiple documents will be pointing to the same underlying binary object.

jkay_
Champ in-the-making
Champ in-the-making

We do only get one copy in the repository, but it seems that it copies the new file over the old file. We have an external process that is accessing the file. It occasionally gets a "Stale NFS file handle" error, indicating that something has deleted and recreated the file. Also, the time stamp on the file is the time of the later copy, not the time of the original ingest. We are trying to avoid the stale handle error.

Didn't ever notice that, but it seems like a bug to me, or at the very least should be easily configurable to work with either scenario. I will have to take a second look.

We're using an atomic move/rename to the MD5 of the file when uploading a new file. For atomicity reasons and to guarantee proper backups we cannot do otherwise. We've never had reports of stale NFS file handles, what's your NFS version and implementation?

Any updates ?

Ana_Paula_Lopes
Champ on-the-rise
Champ on-the-rise

Although it's the same file (blob), it includes a new ... What should I do?

Heeelp

  1. this site uses English

ok

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.