Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
This module will parse the multipart-form containing files and fields from the lambda event object.
npm install partparse --save
This nodejs module will parse the multipart-form containing files and fields from the AWS lambda event object. It works very well parsing binary and text files.
@param {event} - an event containing the multipart-form in the body
@return {object} - a JSON object containing array of files and fields, sample below.
{
files: [
{
filename: 'test.pdf',
content: <Buffer 25 50 6f 62 ... >,
contentType: 'application/pdf',
encoding: '7bit',
fieldname: 'uploadFile1'
}
],
field1: 'VALUE1',
field2: 'VALUE2',
}
const parser = require('partparse');
const result = await parser.parse(event);
console.log(result.files);
Important Please make sure to enable the "Use Lambda Proxy integration" in API Gateway method Integration request.
If decided not to enable it for some reason, make sure to pass the required Lambda event parameters in Integration Request -> Mapping Templates section, such as body, headers and isBase64Encoded flag.
npm run test
0.0.1 - Initial stable release.
0.0.2 - Updated readme. Added Usage and link to sample implementation.
1.0.0 - Formalized package release version. Add utf8 support.
1.0.1 - Added support for TypeScript typings.
FAQs
This module will parse the multipart-form containing files and fields from the lambda event object.
The npm package partparse receives a total of 109 weekly downloads. As such, partparse popularity was classified as not popular.
We found that partparse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.