Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

iostreams-s3

0.1.0 • Public • Published

iostreams-s3

Bootstrap stream provider for iostreams

Build Status Coverage Status Dependency Status

Install

$ npm install iostreams iostreams-s3

Usage

var iostreams = require('iostreams');
 
iostreams.use(require('iostreams-s3'));
 
// Getting an input stream
iostreams.getInputStream({
  protocol: 's3:',
  key: process.env.S3_KEY,
  secret: process.env.S3_SECRET,
  bucket: process.env.S3_BUCKET,
  region: 'eu-west-1'
  path: '/non-existent-file.png'
}, function(err, inputStream) {
 
});
 
// Getting an output stream
iostreams.getOutputStream({
  protocol: 's3:',
  key: process.env.S3_KEY,
  secret: process.env.S3_SECRET,
  bucket: process.env.S3_BUCKET,
  region: 'eu-west-1'
  path: '/file-to-be-created.flv',
  'Content-Length': fileSize, // Content-Type MUST be defined
  'Content-Type':   'video/flv',
  'x-amz-acl':      'public-read'
} function(err, outputStream) {
 
});
 
// Getting an input and output stream
iostrams.getInputAndOutputStream(
  inputConfigObject,
  outputConfigObject,
  function(err, inputStream, outputStream) {
    intputStream.pipe(outputStream);
  }
);

Licence

MIT

install

npm i iostreams-s3

Downloadsweekly downloads

4

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar