Page 1 of 1

MP3 download link

Posted: Fri Aug 30, 2019 5:58 pm
by Rick47
How do I create a download link for an MP3 file. I've searched the forum and I can see references to MP3 downloads on a phone, but nothing else. I have a link set up but it wants to play the file rather than download it.
I added in download="myfile.mp3" into the advanced, but that appears to do nothing. I'm sure there is a simple answer to this, but I can't find it.

Re: MP3 download link

Posted: Fri Aug 30, 2019 6:18 pm
by Pablo
The behavior of downloads is determined by the browser configuration.
By default, this will open the audio player.

I am not sure if you can overwrite this behavior. The user is in control.

Re: MP3 download link

Posted: Fri Aug 30, 2019 6:41 pm
by crispy68
I did a google search and found this you could try:

https://gist.github.com/jmharris903/4235874

Re: MP3 download link

Posted: Fri Aug 30, 2019 8:35 pm
by Rick47
Thanks crispy68, I saw a similar page with near identical code, but the problem is I need to show a table with many files to download.
In these days where mp3s are a ubiquitous commodity and are transferred and downloaded by millions on a minute by minute basis, I would have thought that there would be a simple solution.
I have over 700 78s that I'm transferring to mp3. I can send them in mail, I can upload them to a destination, but I can't find code that will allow a user to download them from my website. Bizarre!

Re: MP3 download link

Posted: Fri Aug 30, 2019 9:13 pm
by alan_sh
Could you have a link as you said above but have instructions which says 'left click to play, right click to download'? I am sure most browsers support a right click to include a 'save as'.

Alan

Re: MP3 download link

Posted: Sun Sep 01, 2019 4:54 pm
by Rick47
The code crispy68 offered seems only to work with IE, but I suspect that this code has been around for quite a while and when most users had only IE as a browser option. I have gone for the 'Right click to download ' option as it seems that it is the only option.
Thanks for everyone's input.