var iostreams = require('iostreams');
iostreams.use(require('iostreams-s3'));
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) {
});
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': 'video/flv',
'x-amz-acl': 'public-read'
} function(err, outputStream) {
});
iostrams.getInputAndOutputStream(
inputConfigObject,
outputConfigObject,
function(err, inputStream, outputStream) {
intputStream.pipe(outputStream);
}
);