简体   繁体   English

Phonegap上传不起作用

[英]Phonegap upload not working

I am using phonegap for the first time and attempting to get a simple image uploaded to my server. 我是第一次使用phonegap,并试图将一个简单的图像上传到我的服务器。 I am using the js from the Full Example in the docs ( http://docs.phonegap.com/en/3.3.0/cordova_file_file.md.html#FileTransfer ) 我正在使用文档( http://docs.phonegap.com/en/3.3.0/cordova_file_file.md.html#FileTransfer )中的完整示例中的js。

I am able to pull up the image gallery and select the image, but nothing is being uploaded to my server, and neither the success or failure callbacks are being fired. 我可以拉起图像库并选择图像,但是什么都没有上传到我的服务器,也没有触发成功或失败回调。

I am not sure if it matters but I am using phonegap build and I am currently testing on iOS but this will eventually be on Android as well. 我不确定这是否重要,但是我正在使用phonegap构建,并且目前正在iOS上进行测试,但最终也会在Android上进行测试。

Any ideas? 有任何想法吗?

after trying to manually run the functions through the debug console I realized that I had the file plugin but not the FileTransfer plugin installed. 在尝试通过调试控制台手动运行功能后,我意识到我安装了文件插件,但未安装FileTransfer插件。 installing that appears to have fixed it. 安装似乎已修复它。

The phonegap documentation is sorely lacking! 严重缺乏phonegap文档!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM