我正在使用phonegap 3.5,我使用该代码将文件传输到远程服务器
function uploadPhoto(imageURI) {
var options = new FileUploadOptions();
alert(typeof FileUploadOptions === "undefined");
options.fileKey="file";
options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
options.mimeType="image/jpeg";
options.headers = {
Connection: "close"
};
options.chunkedMode = false;
var params = {};
params.value1 = "test";
params.value2 = "param";
options.params = params;
alert("object is " + options.fileName);
alert(typeof FileTransfer === "undefined");
var ft = new FileTransfer();
ft.upload(imageURI, encodeURI("myserver url "), win, fail, options);
}
如果我为文件和文件传输安装了两个插件,文件传输是未定义的