I have some very large mp3's stored at a remote location and I presently link to them like so:
= link_to "mp3", "http://website-where-file-is-stored.com/file-123456.mp3"
When a user clicks the link, the file starts to play in the browser. I would like the file to download to the users hard-drive after they click the link.
I've read a number of articles like this one and this one which promote methods that work in different situations to my own.
I have multiple files. Each file is stored on a remote server which does not have a rails app running.
I don't require users to be authorized prior to downloading anything so I don't want my rails app to be called into action in any way as I need to be conservative with my rails processes.
Is this something I need to do in config.ru? Is there a guide or tutorial detailing the best way to do this?
I know that I need to set the Content-Disposition
header but as I said, I can't figure out how to do that I do not have a rails app running on the remote server, it's just a bunch of server space.