1inputStream
2 .pipe(uploadFromStream(s3));
3
4function uploadFromStream(s3) {
5 var pass = new stream.PassThrough();
6
7 var params = {Bucket: BUCKET, Key: KEY, Body: pass};
8 s3.upload(params, function(err, data) {
9 console.log(err, data);
10 });
11
12 return pass;
13}
14