Commit b6ccf06c by jyurek

Quick fix in Upfile

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@304 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
parent 5f2b2cd5
......@@ -6,7 +6,7 @@ module Paperclip
# Infer the MIME-type of the file from the extension.
def content_type
type = self.path.match(/\.(\w+)$/)[1] || "data"
type = self.path.match(/\.(\w+)$/)[1] rescue "octet-stream"
case type
when "jpg", "png", "gif" then "image/#{type}"
when "txt", "csv", "xml", "html", "htm", "css", "js" then "text/#{type}"
......
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