alfresco-js-api icon indicating copy to clipboard operation
alfresco-js-api copied to clipboard

NodesAPI.getFileContent() corrupts document content when used in browser.

Open binduwavell opened this issue 5 years ago • 2 comments

Type of issue:

- [x] Bug  

Current behavior: ASCII characters in document content are fetched correctly. Characters outside of the Latin1 character set appear to be corrupted.

Expected behavior: Fetching a file from the browser returns something that can handle full unicode/utf-8 encoding and does not corrupt the document content.

binduwavell avatar Nov 12 '18 18:11 binduwavell

Hi @binduwavell can you please provide an example code? or anything else can help me on reproducing the problem?

eromano avatar Nov 29 '18 10:11 eromano

Het Eugenio,

Use case: read file from repo and immediately post to DocuSign via their API all in the browser.

This API corrupts non latin1 characters: https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/src/api/NodesApi.js#L358

My workaround was to just use Angular http library and that worked without issue. My comments to folks today about POST being broken were me not remembering this issue properly. Issue is reading not writing...

binduwavell avatar Jan 29 '19 18:01 binduwavell