stream-uploads
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:
processenvS3_BUCKET_NAME = 'your-bucket'
Simply attach the provided router and start accepting streaming uploads at '/uploads'
:
const app = const streamingUploadsRouter = router app app
Or make your own custom implementation using the uploadHandler
middleware:
const express = const app = const uploadHandler = uploadHandler app
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