Make configuarable s3_permissions for paperclip (#2139)

th-downstream
tmyt 8 years ago committed by Eugen
parent 03971de5c5
commit 2e1e061f24

@ -16,7 +16,7 @@ if ENV['S3_ENABLED'] == 'true'
Paperclip::Attachment.default_options[:s3_host_name] = ENV.fetch('S3_HOSTNAME') { "s3-#{ENV.fetch('S3_REGION')}.amazonaws.com" }
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
Paperclip::Attachment.default_options[:s3_headers] = { 'Cache-Control' => 'max-age=315576000' }
Paperclip::Attachment.default_options[:s3_permissions] = 'public-read'
Paperclip::Attachment.default_options[:s3_permissions] = ENV.fetch('S3_PERMISSION') { 'public-read' }
Paperclip::Attachment.default_options[:s3_region] = ENV.fetch('S3_REGION') { 'us-east-1' }
Paperclip::Attachment.default_options[:s3_credentials] = {

Loading…
Cancel
Save