Thumbnail paths

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

0 votes

3 answers

3700 views

ANSWER



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?

0 votes



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

0 votes



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:

  • nuxeo.data.dir is the folder corresponding to the nuxeo.data.dir property from nuxeo.conf
  • binaries is the path defined in the binaryManager contribution
  • data is the hierarchy with the actual binaries in subdirectories
  • a7 is a folder named after the two first characters of the digest
  • 5b is a folder named after the third and fourth characters of the digest
  • a75badefeb96972667306ac8f696143b is the file named after the digest
0 votes