问题模块 |
---|
API和组件 |
小程序文件上传,提示文件上传失败,报错errMsg:"uploadFile:fail exceed max upload connection count 10",
微信这个下载接口是多线程的么?
我就一个上传一张图片,为什么超过最大并发数?
chooseImg: function () { var that = this ; wx.chooseImage({ count: 1, sizeType: [ 'compressed' ], sourceType: [ 'album' , 'camera' ], success: function (res) { that.upload(res.tempFilePaths[0]); }, }) }, upload: function (path) { wx.uploadFile({ url: 'https://xxxx/api/car/upload-car-image' , filePath: path, name: 'car_image' , header: { 'content-type' : 'multipart/form-data' }, formData: { 'attach_attr' : 1 }, success: function (res) { // success console.log( "成功" ) console.log(res.data) }, fail: function (res) { // fail console.log( "失败" , res) }, complete: function () { // complete console.log( "完成" ) } }) }, |
根本都没有连接服务器,就直接报错了
网友回复
张平:
怎么解决的