You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending a multipart that contains no Content-Type header inside breaks the parsing... Content-Type is used after the filename for matches, however it is not to be assumed there. Taken from the RFC1341
"A body part is NOT to be interpreted as actually being an RFC 822 message. To begin with, NO header fields are actually required in body parts. (...) the absence of a Content-Type header field implies that the encapsulation is plain US-ASCII text."
body = multipart.parse(event);
if ("pdf" in body && body.pdf.content.includes("\r\n\r\n")) {
// https://github.com/myshenin/aws-lambda-multipart-parser/issues/28
body.pdf.content = body.pdf.content.split("\r\n\r\n")[1];
}
Hi,
Sending a multipart that contains no Content-Type header inside breaks the parsing... Content-Type is used after the filename for matches, however it is not to be assumed there. Taken from the RFC1341
https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
We want to use this lib but we will have to use a fork instead and raise a PR if this is still being maintained?
The text was updated successfully, but these errors were encountered: