diff options
author | Yusuke Abe <moonset20@gmail.com> | 2017-04-14 04:52:56 +0900 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-13 21:52:56 +0200 |
commit | 169c68a739e2907ea29313983bc5a849f585bed3 (patch) | |
tree | e83f526626eb4aa9df1564338381d3b65455b37a /config | |
parent | 9f182346d7fb7ea6e7600ea5d1fa58580f62ed68 (diff) |
Add filename extension to paperclip (#1718)
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/paperclip.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index 2a2ef8fea..c58f1b06c 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -4,7 +4,7 @@ Paperclip.options[:read_timeout] = 60 Paperclip.interpolates :filename do |attachment, style| return attachment.original_filename if style == :original - [basename(attachment, style), extension(attachment, style)].delete_if(&:empty?).join('.') + [basename(attachment, style), content_type_extension(attachment, style)].delete_if(&:empty?).join('.') end if ENV['S3_ENABLED'] == 'true' |