Commit ae79e5da by Winfred Nadeau Committed by Prem Sichanugrist

added support for SVG mime-type recognition. Closes #493

`convert` will pick this up automatically. :)
parent cb037ae7
...@@ -11,6 +11,7 @@ module Paperclip ...@@ -11,6 +11,7 @@ module Paperclip
when %r"jp(e|g|eg)" then "image/jpeg" when %r"jp(e|g|eg)" then "image/jpeg"
when %r"tiff?" then "image/tiff" when %r"tiff?" then "image/tiff"
when %r"png", "gif", "bmp" then "image/#{type}" when %r"png", "gif", "bmp" then "image/#{type}"
when %r"svg" then "image/svg+xml"
when "txt" then "text/plain" when "txt" then "text/plain"
when %r"html?" then "text/html" when %r"html?" then "text/html"
when "js" then "application/js" when "js" then "application/js"
......
...@@ -6,6 +6,7 @@ class UpfileTest < Test::Unit::TestCase ...@@ -6,6 +6,7 @@ class UpfileTest < Test::Unit::TestCase
%w(png) => 'image/png', %w(png) => 'image/png',
%w(gif) => 'image/gif', %w(gif) => 'image/gif',
%w(bmp) => 'image/bmp', %w(bmp) => 'image/bmp',
%w(svg) => 'image/svg+xml',
%w(txt) => 'text/plain', %w(txt) => 'text/plain',
%w(htm html) => 'text/html', %w(htm html) => 'text/html',
%w(csv) => 'text/csv', %w(csv) => 'text/csv',
......
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