What is the ecoding format of assets stored in CRXDE. | Community
Skip to main content
Level 6
Aug 10, 2022 2:09 PM UTC
Solved

What is the ecoding format of assets stored in CRXDE.

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.
lukasz-m
lukasz-mAccepted solution
New Participant
Aug 10, 2022 3:17 PM UTC

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.

5 replies

DEBAL_DAS
New Participant
Aug 10, 2022 5:12 PM UTC

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.

Translate
lukasz-m
lukasz-mAccepted solution
New Participant
Aug 10, 2022 3:17 PM UTC

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.

Translate
Level 6
Sep 2, 2022 1:14 PM UTC

@lukasz-m 

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

Translate
arunpatidar
New Participant
Aug 10, 2022 2:37 PM UTC

try saving the response as docx and check?

Translate
Arun Patidar
Level 6
Aug 10, 2022 2:42 PM UTC

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

 

Translate