Reputation: 403
As you know, chrome is playing an mp3 file using it's own player. But I need to download it to my file system.. I tryed this, but do not have any result:
$('.audio_download').click(function(){
var s = $(this).attr('value');
$('body').append('<iframe src='+s+' class="dlframe"></iframe>');
$('iframe.dlframe').ready(function(){
$(this).remove();
});
});
I checked console and I found there this: Resource interpreted as Document but transferred with MIME type audio/mpeg: "some-url.mp3".
Upvotes: 0
Views: 2882
Reputation: 267
Set attribute "download" like
<a href='file.mp3' download='Very-Very-Good.mp3'>download</a>
Upvotes: 2
Reputation: 1604
You need to modify htaccess like so http://css-tricks.com/snippets/htaccess/force-files-to-download-not-open-in-browser/ on your web server
Upvotes: 0