Avoiding content type issues when downloading a file via browser on Android

后端 未结 5 1768
無奈伤痛
無奈伤痛 2020-11-29 02:24

If I have a file made available to a browser through my webapp, I normally just set the URL to something like http://website.com/webapp/download/89347/image.jpg

5条回答
  •  时光取名叫无心
    2020-11-29 02:46

    I have tried all recommendations from Jspy blog and nothing worked so far. Content-disposition brings browser in downloading mode, however nothing gets downloaded except HTML of page from which download got initiated. So my conclusion, it is pure bug from Google and we may only pray for that Google fix it. My work around was to set content type to some type coming from Accept header form mobile browser. It generally works, you can even download zip files as text.

提交回复
热议问题