]> cat aescling's git repositories - mastodon.git/commitdiff
Change default S3 ACL string used by Paperclip from 'public' (which is invalid) to...
authorEffy Elden <git@effy.is>
Sun, 15 Jan 2017 09:58:46 +0000 (20:58 +1100)
committerEffy Elden <git@effy.is>
Sun, 15 Jan 2017 09:58:46 +0000 (20:58 +1100)
config/initializers/paperclip.rb

index 999ff47c74be1da3434f327b69ced878df45deab..71a7b514ec9a27884685ec4c9f8cdb9349af5fd5 100644 (file)
@@ -11,7 +11,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', 'Expires' => 10.years.from_now.httpdate }
-  Paperclip::Attachment.default_options[:s3_permissions] = 'public'
+  Paperclip::Attachment.default_options[:s3_permissions] = 'public-read'
   Paperclip::Attachment.default_options[:s3_region]      = ENV.fetch('S3_REGION') { 'us-east-1' }
 
   Paperclip::Attachment.default_options[:s3_credentials] = {