mirror of
https://github.com/kemko/paperclip.git
synced 2026-01-01 16:05:40 +03:00
Проставляем правильный content_type для svg
This commit is contained in:
@@ -414,7 +414,7 @@ module Paperclip
|
||||
end
|
||||
|
||||
def post_process #:nodoc:
|
||||
return unless content_type.match(/image/)
|
||||
return if !content_type.include?('image') || content_type.include?('svg')
|
||||
return if queued_for_write[:original].nil?
|
||||
|
||||
instance.run_paperclip_callbacks(:post_process) do
|
||||
|
||||
@@ -20,6 +20,7 @@ module Paperclip
|
||||
when %r"html?" then "text/html"
|
||||
when "csv", "xml", "css", "js" then "text/#{type}"
|
||||
when "liquid" then "text/x-liquid"
|
||||
when 'svg' then 'image/svg+xml'
|
||||
else "application/x-#{type}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user