|
|
@ -11,7 +11,7 @@ if ENV['S3_ENABLED'] == 'true' |
|
|
|
Aws.eager_autoload!(services: %w(S3)) |
|
|
|
|
|
|
|
Paperclip::Attachment.default_options[:storage] = :s3 |
|
|
|
Paperclip::Attachment.default_options[:s3_protocol] = 'https' |
|
|
|
Paperclip::Attachment.default_options[:s3_protocol] = ENV.fetch('S3_PROTOCOL') { 'https' } |
|
|
|
Paperclip::Attachment.default_options[:url] = ':s3_domain_url' |
|
|
|
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' |
|
|
|