with just a plain html and js file, how can i force a link to an mp3 to download instead of just play?

前端 未结 7 2110
误落风尘
误落风尘 2021-01-13 15:50

i have a link to a media file such as an mp3, and i want it to get downloaded when the user clicks on it, instead of just having the file get played. the page i have in min

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-13 16:18

    While this is not a solution, change the file extension to anything other than MP3. And, ask the user to rename it once downloaded.

提交回复
热议问题