logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 169c68a739e2907ea29313983bc5a849f585bed3
parent: 9f182346d7fb7ea6e7600ea5d1fa58580f62ed68
Author: Yusuke Abe <moonset20@gmail.com>
Date:   Fri, 14 Apr 2017 04:52:56 +0900

Add filename extension to paperclip (#1718)


Diffstat:

Mconfig/initializers/paperclip.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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'