Преглед на файлове

Merge pull request #476 from ineffyble/fix-paperclip-s3-acl

Fix S3 default settings
master
Eugen преди 7 години
committed by GitHub
родител
ревизия
16f9490d33
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      config/initializers/paperclip.rb

+ 1
- 1
config/initializers/paperclip.rb Целия файл

@@ -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] = {


Зареждане…
Отказ
Запис