0

I wanted to have a link to allow the users to download the videos. But a direct link to an mp4 file opens a native player in some browsers (like Chrome and Safari) and plays the video instead of downloading it. So I'd have to put a note next to the link “Right click and choose to save link as...” to let the users know how to save it, and I'd like to avoid that if possible.

1 Answer 1

0

It sounds like you want the download attribute.

Here is an example:

<a href="/media/my_new_song.mp3" download>click to download my song</a>

Here is a W3Schools article for further reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.