Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support binary files from base64 encoding #26

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tony-aq
Copy link
Contributor

@tony-aq tony-aq commented Feb 11, 2019

This change is Reviewable

@atis
Copy link

atis commented May 7, 2019

This would be very needed, right now i'm using workaround:

var event2 = event;
if (event.isBase64Encoded) {
    event2.body = Buffer.from(event.body, 'base64').toString('binary');
}
var files = multipart.parse(event2, false);

@arackaf
Copy link

arackaf commented Apr 13, 2020

@atis - solid - thanks a ton. Also, it's not entirely clear what that spotText field does, but it seems true is what you now want to if you want content to be a buffer, which is the only way this works for me.

@MMIharish
Copy link

@atis - Thanks. For me also, this worked with multipart.parse(event2, true);

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

Successfully merging this pull request may close these issues.

4 participants