I tried to directly upload the file stream as a parameter, but it didn't work.
var param = {
Bucket: 'sql-dev',
Key: 'Report',
Body: new Buffer(fs.createWriteStream('./temp/ALL.csv'))
};
s3bucket.putObject(param, function(err, data){
if(err) console.log(err);
else console.log(data);
});
How do I use that?