L
L
leaningless2016-10-05 01:52:59
JavaScript
leaningless, 2016-10-05 01:52:59

How to save a media file in JS using a direct link?

There is a direct link to the audio file that opens the file in a new browser tab.
Can you please tell me what JavaScript function can save a file to disk without opening it in a new tab?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Azim Kurt, 2016-10-05
@leaningless

<a href="myfile.mp3" download="myfilename">Muse – Uprising</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question