0

I am uploading images to my S3 bucket via multer-s3. Everything is working fine, the images gets dropped in my bucket.

var cloudStorage = multerS3({
    s3: s3,
    bucket: 'mybucket',
    acl: 'bucket-owner-full-control',
    serverSideEncryption: 'AES256',
    key: function (req, file, callback) {
        callback(null, file.originalname)
    }
});

var upload  = multer({ 
            storage: cloudStorage,
            limits: {
                fileSize: 10000000,
                files: 6
            }).any()

The problem I am facing is that when a user uploads an image, and I go to the location of that image, I get an 'access denied' XML file. How do I grant access to the files that the user that uploaded, but deny access for everyone else?

manneJan89
  • 1,004
  • 8
  • 27

0 Answers0