我使用node.js使用Multipart Upload将视频上传到Amazon-S3。我正在使用this参考
默认情况下,上传的视频只能由所有者访问。
使用以下代码上传文件时
var params_to_upload_on_S3 = { ACL:' public-read', 斗:imageBucket, 密钥:imgName +" .jpg", 身体:imageBuffer, ContentType:'图片/ 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');
});
});