Commit a51811de by Alex Godin

changed self.path to self.original_filename to avoid issues like issue #201

parent c17a358e
......@@ -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] rescue "octet-stream").downcase
type = (self.original_filename.match(/\.(\w+)$/)[1] rescue "octet-stream").downcase
case type
when %r"jp(e|g|eg)" then "image/jpeg"
when %r"tiff?" then "image/tiff"
......
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