Audio download link works in Firefox but streams in Chrome -


i've setup download link on site i'm building when users sign musicians mailing list can download track free. current code:

<a href="http://samsouth.com/audio/mind.mp3">click here download</a>

it works in firefox when click link opens window asking if you'd download in chrome streams track. if change file .ogg reverse happens - can download in chrome streams in firefox. guess happening because i'm providing format browser capable of streaming. how stop streaming? can provide 2 href's?

having looked similar questions here came across html5 attribute can added links download="filename.mp3" i've tried this:

<a  href="http://samsouth.com/audio/mind.mp3" download="mind.mp3">click here download</a> 

but still keeps streaming in chrome, ideas? please?

can zip file? that'll avoid streaming.

other option

other option little of php :

<?php $file = $_get['file']; header ("content-type: octet/stream"); header ("content-disposition: attachment; filename=".$file.";"); header("content-length: ".filesize($file)); readfile($file); exit; ?> 

and

<a href="direct_download.php?file=filename.mp3">download mp3</a> 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -