myshenin / aws-lambda-multipart-parser

Parser of multipart/form-data requests for AWS Lambda
MIT License
74 stars 38 forks source link

Warning

The project is currently closed, and no further updates will be conducted. Please, consider using other libraries.

aws-lambda-multipart-parser

Introduction

Support of multipart/form-data requests is a relatively new feature for AWS Lambdas. Although, there is such feature, majority of libraries for parsing multipart/form-data requests is based on server technology, which can't be used in case of AWS Lambdas. That's why, AWS Lambda specific multipart/form-data parser was created.

Steps for integrating multipart/form-data to your lambda

1.Create project with serverless framework.

You can find all necessary information there:

8. Issue with malformed media files uploaded to S3.

Unfortunately, there is an issue with malformed media files uploaded to S3. Let me explain on example, I send an image, which is 50Kb. I get a buffer, which is 50Kb. That fact indicates buffer is formed well, but some encoding issue happens with s3.upload and s3.putObject functions. If you have a solution or a hint, contact me myshenin.contact@gmail.com.