cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get size of the uploaded image in KBs or MBs while searching in Nuxeo

Ankush_Bandil
Confirmed Champ
Confirmed Champ

I am using below URL, request and headers. I want to get size of the image in KBs or MBs uploaded in Nuxeo. The key with dms: prefix are custom fields. How can I get the size?

Endpoint: /site/automation/Repository.Query

Request { "params" : { "query" : "select * from Document WHERE dms:case_id ='Test602' AND ecm:isTrashed = 0 AND dms:applicant_id = '0' AND dms:tenant_id = '1' AND ecm:versionVersionableId IS NULL ", "pageSize" : "30", "language" : "NXQL", "currentPageIndex" : "0" } }

Headers X-NXProperties:*

1 REPLY 1

Gregory_Carlin
Elite Collaborator
Elite Collaborator

Hello,

The information is stored in the length property of your blob, like in

"file:content": { "name": "Plane.png", "mime-type": "image/png", "encoding": "", "digestAlgorithm": "MD5", "digest": "97dd6ae79e4e6f3cb868b7cef4d4f8bb", "length": "268322", "data": "https://nightly.nuxeo.com/nuxeo/nxfile/default/0cce04fa-d030-4005-8060-7e8bd612e491/file:content/Plane.png?changeToken=3-0" },

The unit should be in bytes, so you have to make some conversions.

Regards

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.