Правильно определяем тип картинок webp по расширению

This commit is contained in:
Dmitry Borisov
2022-02-22 11:52:19 +03:00
parent 10baff9a8d
commit 9472a344b9

View File

@@ -15,6 +15,7 @@ module Paperclip
when %r"jpe?g" then "image/jpeg"
when %r"tiff?" then "image/tiff"
when %r"png", "gif", "bmp" then "image/#{type}"
when "webp" then "image/webp"
when "txt" then "text/plain"
when %r"html?" then "text/html"
when "csv", "xml", "css", "js" then "text/#{type}"