麻烦从浏览器在Android上下载文件 [英] Trouble downloading file from browser on Android

查看:126
本文介绍了麻烦从浏览器在Android上下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我测试了一个网站使用我的银河S5这是在发展。我们的应用程序上公开AWS S3文件使用签名的网址下载。

I'm testing a website that's in development using my Galaxy S5. Our app exposes files on AWS S3 for download using signed urls.

在下载失败,内置的浏览器和Chrome,但在Firefox工程(它也可以在所有的浏览器,我们测试过的所有其他平台上)。

Download fails in the built-in browser and Chrome, but works in Firefox (it also works in all browsers on every other platform we've tested).

该文件显示为在我的通知区域,即使我们设置了内容处置像它说,在这里:的 http://www.digiblog.de/2011/04/android-and-the-download-file-headers/ 。经过一段时间的下载失败。从我的团队成员对他们的Andr​​oid手机相同的问题。复制网址并直接将其粘贴到地址栏失败也是如此。

The file shows up as in my notification area even though we set the Content-Disposition like it says to here: http://www.digiblog.de/2011/04/android-and-the-download-file-headers/. The download fails after a while. Out members of my team have the same exact issue on their Android phones. Copying the URLs and pasting them directly to the address bar fails as well.

我们现在能够下载未签名的S3网址,但我们需要签名的版本安全性。此外,而不是攻的链接,如果可以开始下载,我们点击+按住该链接,选择保存链接从上下文菜单,然后它的工作原理(但只能在Chrome中,仍然无法在默认浏览器),但我们可以'不要指望客户知道要使用此解决。

We're able to download unsigned S3 URLs, but we need the signed versions for security. Also, if instead of tapping the link to start the download, we tap+hold the link and select "Save link" from the context menu then it works (but only in Chrome, still fails in the default browser), but we can't expect customers to know to use this work around.

推荐答案

它看起来像这个问题是我们的斗名包含下划线,根据该规范,这是不子域无效。 Android的下载管理器遵守规范,而其他人不关心。

It looks like the problem was our bucket names contained underscores, which aren't valid in subdomains according to the spec. The Android download manager obeys the spec, while everyone else doesn't care.

https://issues.apache.org/jira/browse/CB-222

这篇关于麻烦从浏览器在Android上下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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