Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I uploading videos using Multipart Upload to Amazon-S3 using the node.js. I am using the this[^] reference

The uploaded video by default is only accessible to owner.

When uploading file using below code

JavaScript
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');
                });

            });


"putObject" has a option ACL: 'public-read' to set the permission. but i didn't find any option in MultipartUpload.

Is there any option to update the permission of existing file or can set permission in Multipart Upload?
Posted
Updated 27-Jun-16 21:34pm

1 solution

Hello,

Uploading file to aws s3 using transfer utility
[^]

In the above link, you can use the fourth option to upload file with meta data. Under meta data, you can alter the permissions for the file.

Hope it helps you!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900