如何上传文件使用android phonegap? [英] how to upload file using android phonegap?

查看:138
本文介绍了如何上传文件使用android phonegap?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用android phonegap创建应用程序。我想上传文件(即,当我点击上传按钮文件选择对话框将打开,然后我选择该文件,然后在该对话框中单击打开按钮。)

I created application using android phonegap. I want to upload file ((i.e. when I click upload button file selection dialog box will open, then I select the file then click open button in that dialog.)

在phonegap API中使用文件传输,但输出不像那样。如何修改phonegap API中的文件传输以选择文件(打开对话框,从该对话框中选择文件)上传?

I use file transfer in phonegap API but the output is not like that. How to modify that file transfer in phonegap API to choose file (open dialog, choose file from that dialog) for upload?

并且我使用< input type =file> 从html。但是它不支持phonegap输出choosefile-按钮显示,当我点击那个按钮没有发生任何事情。

And also I use <input type="file"> from html. But it is not supported by phonegap The output is choosefile-button is displayed but when I click on that button nothing happens.

当我点击按钮时,如何打开filedialog并从对话框中选择文件?

How I will open filedialog and choose file from dialog when clicking the button?

请指导我。

提前感谢。

Please guide me.
Thanks in advance.

推荐答案

查看此< =http://opensourcesoftwareandme.blogspot.com/2012/08/attaching-file-in-cordova-uploading-it.html =nofollow> post ,它指向了一个关于GitHub的例子显示如何使用< input type =file> 在PhoneGap中附加文件,并使用jQuery Mobile上传。

Check out this post. It points to an example on GitHub which shows how to attach a file in PhoneGap using <input type="file"> and upload it using jQuery Mobile.

这篇关于如何上传文件使用android phonegap?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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