This question already has an answer here:
Let's say I have two links to same file called hello.avi
<a href="/example.com/hello.avi">Play Movie</a>
and
<a href="/site.com/hello.avi">Download Movie</a>
when the user clicks the second link, how can I make the file to be prompted for a download, instead of opening the hello.avi
file
</div>
Download file when clicking on the link (instead of navigating to the file):
<a href="test.avi" download>Click here</a>
Download file and rename it to mytextdocument.avi:
<a href="test.avi" download="mytextdocument">Click here</a>
You can add Download attribute to your anchor tag as following
<a href="/site.com/hello.avi" download>Download Movie</a>
<a href="/images/your-picture.jpg" download>
You should google your question before posting it here.
try this one:
<a href="/example.com/hello.mp4" download>Download Movie</a>