Issue
Here's my html:
<a class="btn fa fa-download" href="https://media.radiofrance-podcast.net/podcast09/11701-23.10.2023-ITEMA_23528507-2023C16756S0296-21.mp3" download="synode 2023 : vent de réforme sur l’église ?.mp3">Download</a>
This link streams the mp3, instead of downloading it... I use the class to make the link look like a button.
How can I make it download the file with the name defined above?
PS:
I'm already using the <a>
element with the download attribute, and it doesn't do what I want. So, this isn't a exact duplicate of the suggested question, even though it has some similarities.
Solution
Usually an anchor element with a download attribute would be expected to download. However, in this case, as it was pointed out by user @esqew in a comment, it may not be the case sometimes...
The way I solved this was to create an new endpoint in my web app, and then let the backend deal with this request. In this we're able to download the file, choose a filename and a file path where to download file (or move the file too)...
Answered By - An old man in the sea.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.