开发者

Download mp3 instead of playing with Webkit

开发者 https://www.devze.com 2023-02-06 15:56 出处:网络
I am using Android 1.5 I am trying to downloa开发者_开发技巧d mp3 via URL link, but instead of download proccess I get auto-play via the webkit.

I am using Android 1.5

I am trying to downloa开发者_开发技巧d mp3 via URL link, but instead of download proccess I get auto-play via the webkit. I do want to download the mp3 file, not to play it straightly from the browser.

Any idea how could I solve this?

thanks, ray.


Send an HTTP Content-Disposition header, like this:

Content-Disposition: attachment;filename="file.mp3"

You can also set the MIME type to application/force-download, but that shouldn't really be necessary.

0

精彩评论

暂无评论...
验证码 换一张
取 消