Skip to content

Commit

Permalink
Register some commonly used mime types (png, jpeg, pdf, zip etc.) per…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
esad committed Jun 28, 2011
1 parent 9921eca commit d73269b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions actionpack/lib/action_dispatch/http/mime_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@
Mime::Type.register "text/css", :css
Mime::Type.register "text/calendar", :ics
Mime::Type.register "text/csv", :csv

Mime::Type.register "image/png", :png, [], %w(png)
Mime::Type.register "image/jpeg", :jpeg, [], %w(jpg jpeg jpe)
Mime::Type.register "image/gif", :gif, [], %w(gif)
Mime::Type.register "image/bmp", :bmp, [], %w(bmp)
Mime::Type.register "image/tiff", :tiff, [], %w(tif tiff)

Mime::Type.register "video/mpeg", :mpeg, [], %w(mpg mpeg mpe)

Mime::Type.register "application/xml", :xml, %w( text/xml application/x-xml )
Mime::Type.register "application/rss+xml", :rss
Mime::Type.register "application/atom+xml", :atom
Mime::Type.register "application/x-yaml", :yaml, %w( text/yaml )

Mime::Type.register "application/pdf", :pdf, [], %w(pdf)
Mime::Type.register "application/zip", :zip, [], %w(zip)

Mime::Type.register "multipart/form-data", :multipart_form
Mime::Type.register "application/x-www-form-urlencoded", :url_encoded_form

Expand Down

0 comments on commit d73269b

Please sign in to comment.