-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I avoid specifying ACLs when uploading files to S3? #2664
Comments
Setting CarrierWave.configure do |config|
config.fog_attributes = { 'x-amz-acl' => 'bucket-owner-full-control' }
end should work, could you check? @emuesuenu @jalkoby @stormsilver |
When ACLs are disabled on the bucket, S3 will throw an error for any request that specifies an ACL regardless of what the ACL is. |
That's not correct, according to the AWS documentation: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
It's working for me and I want you to actually use that configuration with your app. |
I am trying to upload a file to an S3 Bucket.
We are using fog-aws as the storage engine,
The object ACL setting for the bucket is disabled.
In this state, it is not possible to specify ACLs when uploading files,
I would like fog-aws to work without setting the x-amz-acl header.
CarrierWave's default implementation is to set some value regardless of the fog_public specification.
carrierwave/lib/carrierwave/storage/fog.rb
Lines 512 to 521 in 1531a67
How can I work around this?
I tried overriding acl_header when inheriting from CarrierWave::Uploader::Base, but it did not work as expected.
The text was updated successfully, but these errors were encountered: