What is the ecoding format of assets stored in CRXDE. | Community
Skip to main content
Level 6
August 10, 2022
Solved

What is the ecoding format of assets stored in CRXDE.

  • August 10, 2022
  • 3 replies
  • 1369 views

When I am hitting this 

through postman
PK��������z��/?����*�L��%0"S1�W3<=�d����:1O���"w��.�����1��&��OSt�#$�$V5�aa�͊��p��IC�1��
I am getting data in above format.

and in crxde it is showing in binary.

How i can convert this encoded file content into readable trext.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @akshaybhujbale,

For word doc there is something like plain rendition that represents content as a plain text (it even can be checked directly from crx) without any formatting etc. Not sure if this will fulfill your requirement but it's definitely worth to explore this option.

So in that case, you can try url like this: http://localhost:4502/api/assets/wordFile.docx/renditions/plain

I have checked above with curl and got plain text of my word document as a response. To be clear I was testing this on AEM 6.5.12.

However if you would like to keep formatting etc, then in my opinion you should send this as binary file, and properly transform/consume on the system that you will be hitting AEM from.

3 replies

arunpatidar
Community Advisor
Community Advisor
August 10, 2022

try saving the response as docx and check?

Arun Patidar
Level 6
August 10, 2022

Hi @arunpatidar 

But I dont want to save this response I want to push this content to somewhere else 

so how I can decode this to redable text?

Which endoding format is is using

 

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
August 10, 2022

Hi @akshaybhujbale,

For word doc there is something like plain rendition that represents content as a plain text (it even can be checked directly from crx) without any formatting etc. Not sure if this will fulfill your requirement but it's definitely worth to explore this option.

So in that case, you can try url like this: http://localhost:4502/api/assets/wordFile.docx/renditions/plain

I have checked above with curl and got plain text of my word document as a response. To be clear I was testing this on AEM 6.5.12.

However if you would like to keep formatting etc, then in my opinion you should send this as binary file, and properly transform/consume on the system that you will be hitting AEM from.

Level 6
September 2, 2022

@lukasz-m 

What in case of .ppt, excel, pdf file ?

DEBAL_DAS
New Member
August 10, 2022

To read the binary data earlier I have referred following link: https://www.bhasaka.com/write-read-binary-data-into-from-jcr-node/

 

Check this if it helps.

Debal Das, Senior AEM Consultant