A writable stream which uploads to Amazon S3 using the multipart file upload API.
Inspired by s3-upload-stream.
npm install s3-stream-upload
var UploadStream = ;var S3 = S3;var key = "file.mp3";var s3 = ;fs;
UploadStream(s3, s3Config, config)
Creates and returns a WritableStream for uploading to S3. Takes an S3 instance, and a
s3Config object, which takes the same options as S3.createMultipartUpload. Additional, non-S3 config options may be set on
config, listed below:
concurrentHow many chunks can be sent to S3 concurrently.
chunk-uploaded- Emitted when a MPU chunk has been uploaded to S3, with the number of chunks uploaded at this point.
- All WritableStream events.
bytesWritten- Like fs.WriteStream, bytes uploaded to S3 currently.
To run unit tests, run:
MIT License, Copyright (c) 2014 Jordan Santell