This project is archived and is in readonly mode.

#1232 ✓resolved
Adam Cigánek

Allow use of symbols for :type option of ActionController::Streaming#send_file/#send_data

Reported by Adam Cigánek | October 17th, 2008 @ 09:55 PM | in 2.x

Attached patch adds support for symbols for :type options of send_file and send_data. Instead of this:

@@@ruby send_file("/foo/bar/whatever.png", :type => "image/png")



you can now do this:

@@@ruby
send_file("/foo/bar/whatever.png", :type => :png)

You can use whatever symbol registered through Mime::Type.register. Test is included.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages