Skip to content

Commit

Permalink
Add config to disable acl in fog storage
Browse files Browse the repository at this point in the history
  • Loading branch information
jalkoby committed Jun 30, 2023
1 parent 114d593 commit cda546c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
CarrierWave thrives on a large number of [contributors](https://github.com/carrierwaveuploader/carrierwave/contributors),
and pull requests are very welcome. Before submitting a pull request, please make sure that your changes are well tested.

First, make sure you have `imagemagick` and `ghostscript` installed. You may need `libmagic` as well.
First, make sure you have `imagemagick`, `ghostscript` and `vips` installed. You may need `libmagic` as well.

Then, you'll need to install the gem dependencies:

Expand Down
2 changes: 2 additions & 0 deletions lib/carrierwave/storage/fog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ def copy_options
end

def acl_header
return {} unless @uploader.fog_acl

case fog_provider
when 'AWS'
{ 'x-amz-acl' => @uploader.fog_public ? 'public-read' : 'private' }
Expand Down
2 changes: 2 additions & 0 deletions lib/carrierwave/uploader/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module Configuration
add_config :fog_authenticated_url_expiration
add_config :fog_use_ssl_for_aws
add_config :fog_aws_accelerate
add_config :fog_acl

# Mounting
add_config :ignore_integrity_errors
Expand Down Expand Up @@ -196,6 +197,7 @@ def reset_config
config.fog_authenticated_url_expiration = 600
config.fog_use_ssl_for_aws = true
config.fog_aws_accelerate = false
config.fog_acl = true
config.store_dir = 'uploads'
config.cache_dir = 'uploads/tmp'
config.delete_tmp_file_after_storage = true
Expand Down

0 comments on commit cda546c

Please sign in to comment.