Reputation: 418
I want to prompt users to save file instead of opening file in application. For example if user click a mp3 file link....mp3 file must not be open in win media player...instead user promoted to download that file.
Upvotes: 0
Views: 1752
Reputation: 218837
Set the Content-Disposition
header to attachment; filename=filename.mp3
. This will suggest to the browser that it should prompt the user to save as the given file name.
Upvotes: 2
Reputation: 6382
I believe you can just send a content-disposition header. I.e.
Content-Disposition: attachment; filename=<file name.ext>
And that should force the option to download the file.
Upvotes: 0