diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-06 18:55:20 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-06 18:55:20 +0100 |
commit | 45230c56ab10cd40d7a2e6e241dd30ae4e40e6b0 (patch) | |
tree | d23ce024916a98d1b1bcf30448e5b7eabfb5bc36 /config | |
parent | 3ab193bc3f40c0336a16dd21c3f3dc66eb86a842 (diff) |
Improve S3 config
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/paperclip.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 73eb3356b..d72761250 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -7,4 +7,7 @@ if ENV['S3_ENABLED'] == 'true' secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'), s3_region: ENV.fetch('S3_REGION') } + + Paperclip::Attachment.default_options[:url] = ':s3_domain_url' + Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename' end |