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

Uploaded file gets corrupted #57

Open
neerajlocusnine opened this issue Feb 1, 2020 · 1 comment
Open

Uploaded file gets corrupted #57

neerajlocusnine opened this issue Feb 1, 2020 · 1 comment

Comments

@neerajlocusnine
Copy link

I am uploading jpeg files from front end (Angular) using form-data to S3 via AWS Lambda. I have installed this plugin and in my serverless.yml have included the configuration as mentioned in this plugin's documentation.

However when I view the file on S3 it is corrupted. Does not matter what type of file I upload (image, doc, pdf) I cannot open it on download. This issue is also present when I make a direct POST request to my lambda function from Postman.

@neeraj87
Copy link

neeraj87 commented Feb 6, 2020

So anyone who finds this and is facing the same issue, if you are receiving multipart/form-data from your front end then in your serverless.yml use this

apigwBinary:
        types:
            - 'multipart/form-data'

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

No branches or pull requests

2 participants