diff options
author | Jeong Arm <kjwonmail@gmail.com> | 2017-10-10 00:52:02 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-09 17:52:02 +0200 |
commit | 9d97054fe6ad72da1ef70b0a027bb32cb1fbdfb4 (patch) | |
tree | 1fb5b0db46d834021793dcf41b0f4263fffb5740 /config/initializers | |
parent | cc796298c9b1c1d2e8b6d36311eb9acc95ab8dc0 (diff) |
Remove timestamps on any option (#5282)
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/paperclip.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 85e97a3ce..2c82a91db 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -7,6 +7,8 @@ Paperclip.interpolates :filename do |attachment, style| [basename(attachment, style), extension(attachment, style)].delete_if(&:blank?).join('.') end +Paperclip::Attachment.default_options[:use_timestamp] = false + if ENV['S3_ENABLED'] == 'true' Aws.eager_autoload!(services: %w(S3)) @@ -18,7 +20,6 @@ if ENV['S3_ENABLED'] == 'true' Paperclip::Attachment.default_options[:s3_headers] = { 'Cache-Control' => 'max-age=315576000' } 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[:use_timestamp] = false Paperclip::Attachment.default_options[:s3_credentials] = { bucket: ENV.fetch('S3_BUCKET'), |