亚马逊AWS S3强制下载的MP3文件,而不是流它 [英] Amazon AWS S3 to Force Download Mp3 File instead of Stream It

查看:566
本文介绍了亚马逊AWS S3强制下载的MP3文件,而不是流它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Amazon S3的把MP3文件,然后让我们的网站访客下载亚马逊AWS的MP3。我用S3Fox来管理文件,一切似乎都工作正常,直到最近,我们得到了来自顾客的抱怨是,MP3是通过浏览器,而不是显示浏览器保存对话框流。 我尝试了一些MP3,注意对一些MP3,保存对话框出现,而对于一些其他人,他们正在通过浏览器流。我能做些什么给力的MP3文件就会被下载,而不是通过Web浏览器流......

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....

任何帮助将是非常美联社preciated。 谢谢

Any help would be much appreciated. Thanks

推荐答案

在为了做到这一点,你需要设置Content-Disposition标头:

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

Content-disposition: attachment; filename=song.mp3

我不认为这是可能的S3Fox。你可以使用<一个href="http://www.drunkenfist.com/304/2007/12/26/setting-far-future-expires-headers-for-images-in-amazon-s3/">Bucket资源管理器(不是免费的)或写上载文件的脚本。

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

这篇关于亚马逊AWS S3强制下载的MP3文件,而不是流它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆