Commit b651d081 by Jon Yurek

Updated the JPEG mime type.

parent 53b10cc1
...@@ -8,10 +8,11 @@ module Paperclip ...@@ -8,10 +8,11 @@ module Paperclip
def content_type def content_type
type = self.path.match(/\.(\w+)$/)[1] rescue "octet-stream" type = self.path.match(/\.(\w+)$/)[1] rescue "octet-stream"
case type case type
when "jpg", "png", "gif" then "image/#{type}" when "jpg" then "image/jpeg"
when "png", "gif" then "image/#{type}"
when "txt" then "text/plain" when "txt" then "text/plain"
when "csv", "xml", "html", "htm", "css", "js" then "text/#{type}" when "csv", "xml", "html", "htm", "css", "js" then "text/#{type}"
else "x-application/#{type}" else "application/x-#{type}"
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment