Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Download button with direct download.


I am trying to figure out if I can set up the player to directly download. So that when the Download button is pressed it will start an automatic download, rather than divert you to another page, where you then have to right click save as.

4 Community Answers

Todd

JW Player Support Agent  
2 rated :

There are a few ways to do this, usually with different levels of success in each browser. Your best bet would be to include server-side headers that tell the browser to accept the file as an attachment, which is usually implemented via a separate PHP page.

video

User  
2 rated :

So I added this, to my .htacess:

<FilesMatch "\.(mp4|MP4)">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>

Looks like it does what I was looking for. Are there any unforeseeable drawbacks to this? Is this what you were suggesting or did I stumble across another method.

Todd

JW Player Support Agent  
1 rated :

I’m certainly not an expert when it comes to web server configurations, but yes, that is one method I found as well. As for unforeseeable drawbacks, I would say this is a good a method as any other, since we are ultimately dependent on how the various browsers choose to implement these headers. The same would also be true for the PHP method as well.

video

User  
2 rated :

Yea It seems work well in IE10, Firefox, and Chrome(after i cleared the cache)

Thanks!

This question has received the maximum number of answers.