var params_to_upload_on_S3 = { ACL: 'public-read', Bucket: imageBucket, Key: imgName + ".jpg", Body: imageBuffer, ContentType : 'Image/jpg' } s3.putObject(params_to_upload_on_S3 , function (err, res) { if(err) console.log('Thumnail Upload Error'+ err); else console.log('Thumbnail Successfully uploaded .'+ JSON.stringify(res)); fs.unlink(imagePath, function(){ console.log('File deleted from local storage'); }); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)