Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

One extra character in file body after upload using the createBlob() function in forceTK.js #99

Open
gpervukhin opened this issue Dec 23, 2019 · 0 comments

Comments

@gpervukhin
Copy link

gpervukhin commented Dec 23, 2019

DESCRIPTION:
If we try to upload a new ContentVersion using the createBlob() function in forceTK.js, then an uploaded file will have one extra byte at the end of content body. It will be a "new line" character (LF).

As a result, some uploaded files get corrupted and cannot be recognized by programs if we download them again. For example, MS Excel and MS Word say that such files are incorrect and suggest to fix the issues in format.

SOLUTION:
The issue is in the blob() function (line #293). It adds "\n\n" sequence between payload and final boundary, but only one "\n" is needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant