0

Wondering if anyone can assist with what should be fairly simple. I have created button after button for standard file downloads but I need one that will trigger the download of an audio file.

I have tried adding the HTML download attribute but it doesn't seem to work. Everything I try wants to play the actual file in the browser instead of triggering download.

<!DOCTYPE html>
<html>

<head>

<style>

a {

background: #464646;
width: 150px;
height:28px;
border-radius: 5px;
text-align:center;
color:#fff;
font-family:arial;
font-size:13px;
padding-top: 12px; 
padding-bottom:12px;
padding-left:37px;
padding-right:37px;
text-decoration:none;

}
</style>
</head>
<body>

<a href="http://secure.cart32.com/WarrenKahn/Is_Life_Coaching_For_Me.mp3" 
download="proposed_file_name">DOWNLOAD</a> 



 </body>
 </html>
Thesis
  • 296
  • 1
  • 2
  • 22
  • 1
    You have to add a HTTP Header on the server side to force the download. Otherwise, the browser will decide. Take a look here: [download mp3 instead of playing in browser by default?](http://stackoverflow.com/questions/3499773/download-mp3-instead-of-playing-in-browser-by-default) – alexP Jul 22 '14 at 05:55
  • Thanks @alexP! Worked perfectly! – Thesis Jul 22 '14 at 07:38

0 Answers0