05-23-2012 08:05 AM
Hi
I have searched the docs extensively but just cannot find the info I need. We are driving Nuxeo from an automation client. I need to work out where Nuxeo stores information about thumbnails that have been generated for a document. So we create a document and attach a file. That file has thumbnails. I need to get the physical location of the binary content for the actual image, as we well as the thumbnails.
Any help would be appreciated
Z
05-25-2012 10:50 AM
Hi, I just wrote a blog post about this. You can read it here: http://dev.blogs.nuxeo.com/2012/05/qa-friday-binaries-stored-nuxeo.html
To sum it up:
The default implementation is DefaultBinaryManager. Its goal is to compute the digest of the binary and store it on the server’s file system accordingly. Let’s say, for instance, that our file has the following digest: a75badefeb96972667306ac8f696143b
Its location will be nuxeo.data.dir/binaries/data/a7/5b/a75badefeb96972667306ac8f696143b where:
05-28-2012 10:31 AM
Hi Laurent - Thanks for that blog. This was something we had worked out from the docs already, but your blog certainly helps. However, the issue we have is not the content of the doc, but rather the thumbnails. Let me illustrate:
I uploaded Penguins.jpg to DAM. The entry in hierarchy appears:
select * from hierarchy where name = 'Penguins.jpg'; -> id=58fd5c4f-e9d0-4a9e-bd78-ccf2c27c99f4
I now check all related entries in hierarchy:
select * from hierarchy where parentid='58fd5c4f-e9d0-4a9e-bd78-ccf2c27c99f4'
This returns a number of entries as follows:
ca4c5033-6a28-4307-97d0-3ba02c0c47fd 58fd5c4f-e9d0-4a9e-bd78-ccf2c27c99f4 0 views
55e73d6d-1260-4d6e-b21a-be756f691348 58fd5c4f-e9d0-4a9e-bd78-ccf2c27c99f4 1 views
1b93df5a-f93d-4258-b3ac-0d3062cdd26f 58fd5c4f-e9d0-4a9e-bd78-ccf2c27c99f4 2 views
bee0d074-7d2a-44cb-b12f-eaed7f87c33d 58fd5c4f-e9d0-4a9e-bd78-ccf2c27c99f4 3 views
edd1fd80-3eb7-4129-be49-9367cccd3295 58fd5c4f-e9d0-4a9e-bd78-ccf2c27c99f4 <null> content
The content entry appears in the content table:
select * from content where id='edd1fd80-3eb7-4129-be49-9367cccd3295'
this gives a DATA value of 9d377b10ce778c4938b3c7e2c63a229a, which I can locate in the repository store, rename to xx.jpg and it shows up as the uploaded item. All good so far.
I now try the process with the thumbnails. It looks like view 2 is the small thumbnail view. I can see this in the views table:
select * from view where id='1b93df5a-f93d-4258-b3ac-0d3062cdd26f'
However, I cannot see an entry for this thumbnail in content and hence cannot work out where on disk it is kept? The view table just seems to have details of the size and name of the thumbnail but no other info. What I really want to do is to find the physical location of the thumbnail jpg.
Hope that is clearer?
regards
Zahir
05-28-2012 12:04 PM
Ok - just worked it out:
The view entries in hierarchy point to entries in the view table - this describes the type of view (thumb, medium etc)
The key is that the content entry for these is not found as the ID of the view entry, but a child of the id. So it looks like the thumbs themselves are documents which also contain content.
I can now locate all the thumb files.
Is there an API call that gives me these physical paths?
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.