🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

stream-uploads

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-uploads

A node.js package that allows you to easily stream uploads to s3

latest
Source
npmnpm
Version
1.4.10
Version published
Maintainers
1
Created
Source

stream-uploads

Build Status npm version

A node.js package that allows you to easily stream uploads to s3. It provides the endpoints, configuration, and middleware to get you up and running stat.

Install

npm install stream-uploads

Usage

Configure your s3 bucket with:

process.env.S3_BUCKET_NAME = 'your-bucket'

Simply attach the provided router and start accepting streaming uploads at '/uploads':

const app = require('express')()
const streamingUploadsRouter = require('stream-uploads').router

app.use(streamingUploadsRouter)

app.listen(3000)

Or make your own custom implementation using the uploadHandler middleware:

const express = require('express')
const app = express()
const uploadHandler = require('stream-uploads').uploadHandler


app.post('/upload', uploadHandler, (req, res) => {

  // Do stuff here ...

}

uploadHandler

A group of Express.js middleware that configures multer, uploads, and reports the errors of attempted uploads to s3 to the client.
  • @param {object} req
  • @param {object} res
  • @param {function} next

Keywords

stream

FAQs

Package last updated on 09 Feb 2016

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