AWS S3 node.js SDK uploaded file and folder permissions

后端 未结 3 1260
有刺的猬
有刺的猬 2021-01-31 13:48

I\'m uploading file to S3 using aws-sdk package:

fs.readFile(sourceFile, function (err, data) {
    if (err) { throw err; }

    s3.client.putObject({
        Bu         


        
3条回答
  •  春和景丽
    2021-01-31 14:20

    Found it http://docs.aws.amazon.com/AmazonS3/latest/dev/ACLOverview.html#CannedACL

    need to add option in putObject or upload:

    ACL:'public-read'
    

提交回复
热议问题