mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-19 05:13:01 +00:00
Add filename extension to paperclip (#1718)
This commit is contained in:
parent
9f182346d7
commit
169c68a739
|
@ -4,7 +4,7 @@ Paperclip.options[:read_timeout] = 60
|
||||||
|
|
||||||
Paperclip.interpolates :filename do |attachment, style|
|
Paperclip.interpolates :filename do |attachment, style|
|
||||||
return attachment.original_filename if style == :original
|
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
|
end
|
||||||
|
|
||||||
if ENV['S3_ENABLED'] == 'true'
|
if ENV['S3_ENABLED'] == 'true'
|
||||||
|
|
Loading…
Reference in a new issue