Saturday 15 May 2010

html - Download button code isn't working -


For some reason this code is not indicating downloading. Instead of placing the file on click once. Any ideas?

  & lt; Form class = "download" method = "get" action = "http://reelcameras.com/wp-content/uploads/2013/06/reel-intro .m4v" & gt; & Lt; Button class = "button" title = "download" type = "submit" & gt; & Lt; Period & gt; & Lt; Period & gt; & Lt; Period & gt; & Lt; Period & gt; Download and lt; / Span & gt; & Lt; / Span & gt; & Lt; / Span & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; / Form & gt;    

If a user has a video player with a browser plugin, try it And will run the file in the browser.

What you can do though, you can add a rule to your .htaccess file, and it will change the MIME , the browser thinks That this one. Exe, and prompts the browser to save the file instead of actually running the video file.

This rule should be in your .htaccess file.

  AddType application / octet-stream M4v   

Note, for each video file type you have on the site, you must add a rule.

No comments:

Post a Comment