Closed maniadel closed 3 years ago
Hi there, have you turned on the Lambda proxy integration by any change in your api method?
From docs/readme - "Important: Please make sure to enable the "Use Lambda Proxy integration" in API Gateway method Integration request."
Hi @francismeynard,
The lambda integration is on. as showed in the screenshot below:
Thank you in advance for your help.
Will you be able to provide more details about the error you are getting?
The problem I am facing is: Traying to upload to S3 image :
When I go to s3, the file is created but can not read it (malformed I think), Here the uploaded file :
As additional information, when I upload txt, csv, css, ... the file are uploaded correctly. But when I try to upload pdf, png, jpg the file is imported (size same, ..) but I can not read it (image borken, pdf the same)
I had same issue.
Managed to solve it by adding multipart/form-data
and application/octet-stream
to Binary Media Types in AWS API Gateway settings.
Or you may also add more specific MIME types too, and they will be interpreted properly. application/octet-stream
is browser-default, but theoretically browser can be more specific lile image/jpeg
After having this tested on few API Gatway setups, only multipart/form-data
needs to be added to make this work
Closing this issue now. Refer to the last comment by @IvanVokhmin for resolution. Thanks
Hello, I am facing issue when I try to upload an image or pdf. Please find here may sample:
handler.js
Serverless
You can use postman or this html code :