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

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:*

0 votes

1 answers




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": "" },

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


1 votes