使用PhoneGap + iPhone上传文件 [英] Uploading files with PhoneGap + iPhone

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

问题描述

我知道PhoneGap应用程序大部分(如果不是全部)HTML5 + CSS + JavaScript。原因上,iPhone不提供控件上传文件。



PhoneGap是否提供允许用户上传文件的任何机制? (图片/视频,在iPhone的情况下)



我知道Titanium允许用户这样做,但它是一个不同的动物与编译的Javascript和专有的API。感谢您的建议/输入。

解决方案

我相信您可以使用 PhoneGap API ,如果服务器应用程序支持,则使用和AJAX帖子上传它们。


$ b $



这里有一些 /github.com/purplecabbage/phonegap-plugins\">示例插件


I understand that PhoneGap applications are largely (if not entirely) HTML5 + CSS + JavaScript. Natively, the iPhone doesn't provide controls to upload files.

Does PhoneGap provide any mechanisms that allow users to upload files? (images / video, in the case of the iPhone)

I know Titanium allows users to do this, but it's a different animal with its compiled Javascript and proprietary APIs. Thanks for your advice/input.

解决方案

I believe you might be able to read the files using the PhoneGap API and the upload them using and AJAX post if the server application supported it.

The other option is to write a custom module/Plugin in PhoneGap that could specific to your needs.

Here are some Example Plugins

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

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