diff options
author | Esad Hajdarevic <esad@esse.at> | 2011-06-28 06:56:28 +0200 |
---|---|---|
committer | Esad Hajdarevic <esad@esse.at> | 2011-06-28 06:56:47 +0200 |
commit | d73269ba53992d8a01e5721aad3d23bc2b11dc4f (patch) | |
tree | 741cfb019987e97f547f8b5dc5033589aed56c71 /actionpack | |
parent | 9921eca51cfc72c58c127973f75d71febf01d526 (diff) | |
download | rails-d73269ba53992d8a01e5721aad3d23bc2b11dc4f.tar.gz rails-d73269ba53992d8a01e5721aad3d23bc2b11dc4f.tar.bz2 rails-d73269ba53992d8a01e5721aad3d23bc2b11dc4f.zip |
Register some commonly used mime types (png, jpeg, pdf, zip etc.) per default
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_types.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_types.rb b/actionpack/lib/action_dispatch/http/mime_types.rb index 68f37d2f65..ae255f96ae 100644 --- a/actionpack/lib/action_dispatch/http/mime_types.rb +++ b/actionpack/lib/action_dispatch/http/mime_types.rb @@ -7,11 +7,23 @@ Mime::Type.register "text/javascript", :js, %w( application/javascript applicati 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 |