Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
ae79e5da
Commit
ae79e5da
authored
Jun 18, 2011
by
Winfred Nadeau
Committed by
Prem Sichanugrist
Jun 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added support for SVG mime-type recognition. Closes #493
`convert` will pick this up automatically. :)
parent
cb037ae7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
lib/paperclip/upfile.rb
+1
-0
test/upfile_test.rb
+1
-0
No files found.
lib/paperclip/upfile.rb
View file @
ae79e5da
...
...
@@ -11,6 +11,7 @@ module Paperclip
when
%r"jp(e|g|eg)"
then
"image/jpeg"
when
%r"tiff?"
then
"image/tiff"
when
%r"png"
,
"gif"
,
"bmp"
then
"image/
#{
type
}
"
when
%r"svg"
then
"image/svg+xml"
when
"txt"
then
"text/plain"
when
%r"html?"
then
"text/html"
when
"js"
then
"application/js"
...
...
test/upfile_test.rb
View file @
ae79e5da
...
...
@@ -6,6 +6,7 @@ class UpfileTest < Test::Unit::TestCase
%w(png)
=>
'image/png'
,
%w(gif)
=>
'image/gif'
,
%w(bmp)
=>
'image/bmp'
,
%w(svg)
=>
'image/svg+xml'
,
%w(txt)
=>
'text/plain'
,
%w(htm html)
=>
'text/html'
,
%w(csv)
=>
'text/csv'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment