keiusui has asked for the wisdom of the Perl Monks concerning the following question:
I want people to be able to download an mp3 file without knowing the actual location of the mp3 file. Therefore I have written the following script which works perfectly in Internet Explorer:
print "Content-type: audio/mp3\n"; print "Content-Disposition: attachment; filename=mypersonalrecording.m +p3\n\n"; open SONG, "/location/to/mypersonalrecording.mp3"; while(read SONG, $download, 16384, 0){print $download;} close SONG;
Would it be better to write print "Content-type: application/x-download\n"; in the header instead?
Back to
Seekers of Perl Wisdom