diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 26b0a2f7cd9b6edc1ba35283b4a40f9709676d5d..5c182ade4893662ddbe31c9df92f74fb59b0d10f 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -67,6 +67,12 @@ if ENV['S3_ENABLED'] == 'true' retry_limit: 0, } ) + + if ENV['S3_PERMISSION'] == '' + Paperclip::Attachment.default_options.merge!( + s3_permissions: ->(*) { nil } + ) + end if ENV.has_key?('S3_ENDPOINT') Paperclip::Attachment.default_options[:s3_options].merge!(