uploadFile:fail exceed max upload connection count 10
没有多次调用,没有循环,不知道为什么就报这个提示了。
wx.chooseImage({
count: 1,
sizeType: [‘original’, ‘compressed’],
sourceType: [‘album’, ‘camera’],
success: function(res) {
dialog.toast(‘正在上传图片…’);
wx.uploadFile({
url: uploadfile_api_url,
filePath: res.tempFilePaths[0],
name: ‘file’,
success: function(res) {
var data = res.data
var status = res.statusCode
//do something
console.log(“success_data”, data);
console.log(“success_status”, status);
},
complete: function() {
console.log(“upload complete”);
},
fail: function(res) {
console.log(“fail”, res);
}
});
},
complete: function() {
console.log(‘chooseImage complete’);
},
fail: function(res) {
console.log(‘fail’, res);
}
});