-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
File/Buffer Size different in memory/file unreadable #750
Comments
How did you resolve this? |
Can be related to #1242? |
The problem I'm having is that when trying to upload, the file that sends is different from the original. Not necessarily the file size |
I solved the problem. My application is running with aws lambda and API Gateway, I was researching and discovered that API Gateway has a configuration called Binary Support, so I left it as template.yaml: FunctionName:
Type: AWS::Serverless::Api
Properties:
BinaryMediaTypes:
- '*/*'
... Edit: It is not recommended to use |
I am using multer in memory on a lambda (failing on both the lambda and locally currently) and uploading an image to s3.
Once I get the buffer from req.file.buffer I send that to s3 (the aws sdk takes in a buffer as one of its payload options) but the file cannot be opened and the file size is quite different than that of the image in the file attached to the request.
Am I missing something?
Is there anything added to the buffer when multer reads the file from the request?
The buffer opening the file locally and the buffer from multer are completely different.
The text was updated successfully, but these errors were encountered: