Force download of file?

Permalink
Is there a way to provide a download link which sets up the content headers so that the browser defaults to saving the file, rather than opening it?

I'm working with MP3s. I would try doing this on my own in the /tools directory, but unfortunately the way that files are wrapped in the tools directory, it is impossible to set the content headers properly since they already have been set

Thank you!

elyon
 
Tony replied on at Permalink Reply
Tony
try this:

$fv->getDownloadURL()
elyon replied on at Permalink Reply
elyon
That works great. Thank you!