Skip to content
Snippets Groups Projects
Commit 169c68a7 authored by Yusuke Abe's avatar Yusuke Abe Committed by Eugen
Browse files

Add filename extension to paperclip (#1718)

parent 9f182346
No related branches found
No related tags found
No related merge requests found
......@@ -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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment