文件上传不工作的Andr​​oid 4.4.2 [英] File Upload Not working in Android 4.4.2

查看:99
本文介绍了文件上传不工作的Andr​​oid 4.4.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了使用PhoneGap的一个应用程序。该应用程序正常工作的所有的Andr​​oid版本。但在这个应用程序中的文件上传功能不能在Android 4.4.2工作。我用Google搜索了很多关于这个问题,我所发现的是,谷歌已禁用此功能为Android 4.4.2。

I have created an app using phonegap. The app works fine on all android versions. But the file upload feature on this app does not work on Android 4.4.2. I have googled a lot on this issue, and all I have found is that Google has disabled this feature for Android 4.4.2.

有没有变通解决呢?我真的需要一个解决这个问题的。这将是巨大的帮助,如果有人能提出一个解决这个问题。

Is there no work around at all? I am really in need of a solution to this problem. It would be great help if someone can suggest a solution to this issue.

推荐答案

有没有机会得到上传文件的的WebView 在Android 4.4.2的工作。

There's no chance to get file uploads working in a WebView on Android 4.4.2.

不过,的onclick 的onchange 事件仍在开火的<输入TYPE =HTML> 元素

Nevertheless, the onclick or onchange events are still fired on the <input type="html"> element.

这意味着您可以通过JavaScript获得文件存在,或致电从这些事件处理Java方法和手动完成文件上传。

This means you can either get the file there via JavaScript or call a Java method from those event handlers and do the file upload manually.

有关科尔多瓦,有一个问题在这里:

For Cordova, there's an issue here:

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

...和解决方法在这里:

... and a workaround here:

https://github.com/cdibened/filechooser

这篇关于文件上传不工作的Andr​​oid 4.4.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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