🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

aws-serverless-express-binary

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-serverless-express-binary

Supported image upload forward to Node Server. This library enables you to utilize AWS Lambda and Amazon API Gateway to respond to web and API requests using your existing Node.js application framework.

1.0.1
latest
Source
npm
Version published
Weekly downloads
186
-0.53%
Maintainers
1
Weekly downloads
 
Created
Source

AWS Serverless Express

Customized from https://github.com/awslabs/aws-serverless-express. This supported image upload via node server like NestJS, etc...

Getting Started

Check details at: https://github.com/awslabs/aws-serverless-express

npm install aws-serverless-express-binary

Sample

req.on("data", function(chunk) {
  data.push(chunk);
})
.on("end", function() {
  body = Buffer.concat(data).toString();
  var bb = new busboy({ headers: { 'content-type': contentType } });

  bb.on('file', function (fieldname, file, filename, encoding, mimetype) {
    const mimeType = mimetype;
    const ext = filename.split('.')[1];
    let chunks;
    file.on('data', function (data) {
      chunks = data;
    }).on('end', function () {
      let base64Image = new Buffer(chunks.toString(), 'binary').toString('base64');
      const fileData = new Buffer(base64Image, 'base64');
    });
  })

  bb.end(body);

Keywords

aws

FAQs

Package last updated on 31 Mar 2020

Did you know?

Socket

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.

Install

Related posts