-
Notifications
You must be signed in to change notification settings - Fork 82
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
Boundary not being returned #9
Comments
hi, sorry for my late response. I see no boundary in your payload. take a deep look at your "body-json" string, it is a base64 encoded payload (your "post"), this is: "LS0tLS0tV2V...WGlNLS0NCg==" when u decode it, you can see:
As you can see in your payload, the boundary is there:
The problem i see is: The boundary doesnt come in the original parameters, it should. Todo:
In your apigateway, in the specific method (POST or GET), look at the "Integration Request", then "Body Mapping Templates", and ensure you are providing the right values, this values are created on-the-fly by apigateway using a code-template. Next code fragement is a copy of my own template (created automatically by apigeteway), this templated is executed by apigateway and it copies values from the apigateway to your service (in json format), so maybe you miss something in this part (look at the "params" part, apigateway will build it, and, it should provide it: events.params.header...). (you can copy and paste this code into your "Body Mapping Template")
|
Hi christiansalazar, Thank you for your response. You were absolutely correct. The boundary was not being set correctly. A header was being set and was overwriting the boundary information. Once I pulled that out, it all worked great! Thanks again for your help and your response. I really appreciate it! Cheers! |
:) |
Hi,
I am currently experiencing an issue with uploading a file using multipart/form-data to AWS. I've setup the API Gateway as you have it in your video and added my lambda.
It seems that the getBoundary method is not returning a boundary and when I attempt to parse into parts that its just not working. The parts array is empty.
Any ideas or suggestions on what could be happening and how to resolve it would be most appreciated.
Thanks ,
John
LAMBDA
The event
The text was updated successfully, but these errors were encountered: