Html Code To Create Download Link
i have html file with video and audio file. and i want to links file such as mp3 or mp4 using tag a href and download that file. My video and audio file stored in same folder with my html file.
i have tried this code :
but not downloaded my file, just open a new tab with a play pause controls in the center.
If you check the code, you'll see that we've simply placed the code for an image inside the code for a normal link. In case you're not aware, to create a link in HTML, you use the element (the 'a' stands for 'anchor'). User can Right click or option-click the link and choose 'Save As.' To download this file. Using this download link, you can provide any type of files like pdf, mp3, text, zip etc. Download from your website.
from this question i get to add 'download' to my href tag, but it is for modern browser. How about for old browser?
how i can create a download link for my video/audio in html file and support for all browser (not only for modern browser)?
thanks in advance and sorry for my bad English.
Html Code To Create Download Link
2 Answers
It depends of your browser settings and plugins however if you are using php you can do a script to download the file like this one:
Html Create Download Link Video
save it as download.php
then create a link like this one
Html Create Download Link Pdf
It should work now, have a nice day.
You can try this. I've tried it, and it's working for me.