如题,请问这是什么原因,谢谢。
{"UUID":"uploader111540733433249","url":"http://192.168.1.102/api/home/setting/upload","options":{"method":"POST","blocksize":2048000,"priority":100},"uploadedSize":18,"totalSize":0,"responseText":"{\"attributes\":{},\"request\":{},\"query\":{},\"server\":{},\"files\":{},\"cookies\":{},\"headers\":{}}","method":"POST","timeout":120,"retry":3,"retryInterval":30,"priority":100,"eventHandlers":{},"requestHeaders":{},"responseHeaders":null,"noParseResponseHeader":null,"cacheReponseHeaders":{},"state":4}
function uploadify() {
console.log('==== 准备上传 ======');
plus.gallery.pick(function(path) {
// mui.toast(path);
//showImg( path );
//createItem(path);
console.log(path);
upload(path);
// console.log(filepath);
}, function(e) {
mui.toast('取消图片选择');
}, {
filter: 'image'
});
}
function upload(path) {
console.log('==== 图片:' + path + '=================')
var task = plus.uploader.createUpload("http://192.168.1.102/api/home/setting/upload", {
method: "POST",
blocksize: 2048000,
priority: 100
},
function(t, status) {
console.log('===== 完成 ======\n');
// 上传完成
if (status == 200) {
alert("Upload success: " + t.url);
// console.log(JSON.stringify(t));
} else {
// console.log(JSON.stringify(t));
alert("Upload failed: " + status);
}
console.log(JSON.stringify(t) + '\n');
console.log(JSON.stringify(t.responseText));
// console.log(r);
// console.log(status);
}
);
task.addFile('images/icon_commentphoto.jpg', {
key: "file"
});
task.start();
}
2 个回复
c***@163.com
这个文件解决了么?
9***@qq.com - ......
你打印code试试