|
function upload() {
try {
var imageURI = document.getElementById('imgShow').src;
var options = new FileUploadOptions();
options.fileKey = "file",
options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1);
options.mimeType = "image/jpeg";
var params = new Object();
params.description = document.getElementById('taDescription').value;
params.latitude = latitude;
params.longitude = longitude;
options.params = params;
var ft = new FileTransfer();
// 上传回调
ft.onprogress = showUploadingProgress;
navigator.notification.progressStart("", "当前上传进度");
ft.upload(imageURI, encodeURI('http://appraise.miic.com.cn/Upload.ashx'), function () {
navigator.notification.progressStop();
}, fail, options);
} catch (e) {
alert(e.Message);
}
}
提交代码如上,在红字处报错。
安卓系统无问题,IOS系统报错弹出窗口显示:Undefined。
求解~~
|
|