On Dec 25, 2010, at 2:41 PM, Ralph Shnelvar wrote:
Marnen Laibow-Koser wrote in post #970622:
By automatically downloading, you are depriving the user of the
choice
of what he wants to do with that file. (You might want him to
download
it, but he might prefer to take a quick listen in the browser
before he
does so.). That's a UI mistake. Again, don't do it.
Ok ... how do I allow them to do either? View locally or download,
as
the user sees fit?
Create two separate paths, and on one, force the download by setting
the file-type to application/binary or something equally un-playable.
On the other, let the file-type come naturally (default behavior). The
two different paths point to the same file, but one is kinked to
always be something that can't be played in a browser.
Walter
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.