How would I go about forcing the browser to download media files instead of attempting to stream them? These are static files in my application directory.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to modify app.yaml in your project, setting
application/octect-streamas mime_type.Check this example:
As correctly stated in comment, it is not a good idea to force a certain mime_type on download.
If your users would prefer to stream your content rather than downloading them, it’s their decision and you shouldn’t force them to download your files.
You could provide two different links, one with stream and one forcing the save dialog.