PhoneGap的Andr​​oid版2.9 - InAppBrowser - <输入类型="文件">不工作

问题描述:

我有Android的一个小的PhoneGap应用程序。

I have a small phonegap app for android.

一键启动一个网站,我用jQuery内置了手机1.3。

One button launches a website I built with jquery mobile 1.3.

我现在用开页面:

 websiteRef=window.open('https://'+webstage+'.mysite.org/mobile?language_id=2', '_blank', 'location=no' );

该网站工作正常。但是,当我打一个页面,允许使用下面的标记上传文件:

The website works fine. But when I hit one page that allows for uploading a file using the following markup:

 <input type="file" name="upload" value="file" data-inline="true" style="min-width:100px;"/>

这是行不通的。它甚至不显示文件选择对话框(库等)。按钮是完全没有的功能和反应。

It does not work. It does not even show a file selection dialog (gallery, etc.). The button is completely without function and reaction.

使用Android的互联网浏览器中打开相同网页能正常工作。在相同的页面,我可以选择e。 G。从画廊和其他文件选择方法和上传作品。

Opening the exact same page using the android internet browser works fine. At the exact same page I can choose e. g. from Gallery and other file selection methods and the upload works.

由于这是一个外部网站,所有的PhoneGap插件,像Android的文件上传引用似乎是没有帮助我。

Since this is an external website, all the references to phonegap PLUGINs like Android File UPloader appear to be of no help for me.

输入类型的文件不被机器人的WebView(它适用于iOS虽然)支持。如果你想浏览你的画廊,你需要使用相机API 检索URI,然后,如果你想在某个地方上传>使用的文件API

input type file is not supported by androids webview (it works on iOS though). if you want to browse your gallery, you need to use the camera api to retrieve the URI and then, if you want to upload it somewhere > use the file api.