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

Issue parsing multipart/form-data #180

Open
dmmulroy opened this issue Aug 24, 2019 · 1 comment

Comments

@dmmulroy
Copy link

commented Aug 24, 2019

I'm trying to parse multipart/form-data with busboy(specifically images) and are running into similar issues as listed in this thread: mscdex/busboy#199. I'm not 100% sure that this is a netlify-lambda issue, but I am using the same busboy code on an express server and it works fine.

Summary of that issue:

This is not a busboy issue, you just need to enable binary support in API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings-configure-with-console.html)

If I can help in anyway, let me know - whether that is providing more detail or diving in (though not sure where) and submitting a PR.

Also linking to my community issue for visibility in case this isn't a repo issues: https://community.netlify.com/t/functions-issues-parsing-images-from-multipart-form-data/3068

@ryanditjia

This comment has been minimized.

Copy link

commented Sep 10, 2019

Also running into the same issue, I wrote about it asking for support in AWS subreddit:
https://www.reddit.com/r/aws/comments/d23ff8/need_help_with_lambda_formdata_nodemailer/

According to the the library I’ve had the most success with (https://github.com/francismeynard/lambda-multipart-parser), a config has to be enabled:

Important Please make sure to enable the "Use Lambda Proxy integration" in API Gateway method Integration request.

If decided not to enable it for some reason, make sure to pass the required Lambda event parameters in Integration Request -> Mapping Templates section, such as body, headers and isBase64Encoded flag.

Sample Lambda and API Gateway implementation with Cloudformation can be found in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.