Access Denied on Save with Private S3 Bucket
JimmyWhitaker opened this issue · comments
Describe the problem
When using a private S3 bucket with read/write restrictions, the save functionality throws an "Access Denied" error when using save-to-server (saving to the S3 bucket). This is due to the ACL permission given in line 28:
gecko/gecko-upload-server/s3.js
Lines 24 to 35 in 9554954
If this line is removed, i.e.
s3.upload({
Key,
Body: file,
Bucket: process.env.AWS_BUCKET //,
// ACL: 'public-read'
}, function(err, data) {
if (err) {
failCallback(err.message)
} else {
successCallback()
}
});
then the upload to a private bucket works.
I'm happy to work on a PR for this, but I wanted to see how you preferred to handle the different cases (public and private S3 buckets). Obviously, a try-catch around the different cases would work, but it's a bit sloppy imo.
System information
OSX - Using docker-compose
Hi @JimnyCricket,
Thanks for this observation.
Can you please create a PR that removes that line?
No need for extra work in handling other cases in the current moment, unless you want to :)
Thanks!
Done.