views:

353

answers:

1

I'm using Amazon S3 to put the mp3 file then allow our site visitor to download the mp3 from Amazon AWS. I use S3Fox to manage the file, everything seems working fine until recently we got many complaints from visitor that the mp3 was streamed via the browser instead of displaying browser save dialog. I try for some mp3 and notice that for some mp3, the save dialog box is appear, and for some others they're streamed via browser. What can I do to force that the mp3 file will be downloaded instead of streamed via web browser....

Any help would be much appreciated. Thanks

+1  A: 

In order to do so you need to set the Content-Disposition header:

Content-disposition: attachment; filename=song.mp3

I don't think this is possible with S3Fox. You could use Bucket Explorer (not free) or write a script to upload the files.

kgiannakakis
Hmm, what kind of script would that be? Could you do that with e.g. s3cmd (http://s3tools.org/s3cmd)?
Jonik
I am not sure about s3cmd. See this forum post http://developer.amazonwebservices.com/connect/thread.jspa?messageID=67395. You can use the REST API to set the headers. Amazon provides libraries for many languages (Ruby, python, C#). You can use the language of your choice to write the script.
kgiannakakis
thanks for your response, I'm using CloudBerry(freeware) to set the content-header. It works fine! thanks a lot
Calua