How can I download a .mp4 file instead of playing it on browser? Support for Chrome, Firefox and IE using javascript or jQuery -
i have .mp4 file need download system when click on anchor tag.
html:
<a href="dscsa_webinar.mp4">download here</a>
is there way download instead of opening in browser?
i needed run on ie , option have through javascript or jquery. else simpler can suggested.
i aware of html5 download
attribute, doesn't support on ie.
i found this: http://www.webdeveloper.com/forum/showthread.php?244007-resolved-force-download-of-mp3-file-instead-of-streaming , similar things excel files.
directly there:
use small php file handle download, put in same folder .mp3:
<?php $file = $_get['file']; header ("content-type: octet/stream"); header ("content-disposition: attachment; filename=".$file.";"); header("content-length: ".filesize($file)); readfile($file); exit; ?>
which can accessed in anchor this:
<a href="direct_download.php?file=fineline.mp3">download mp3</a>
Comments
Post a Comment