wx.uploadFile一次性上传多图怎么弄啊?
wx.chooseImage({ success: function(res) { var tempFilePaths = res.tempFilePaths//确定是一个多图的数组 wx.uploadFile({ url: 'http://192.168.11.168/kljjd/home/report/add/', filePath: tempFilePaths,//这里是多个不行, tempFilePaths[0]这样可以 name: 'file[]',//我尝试这样写也不行 formData:{ 'user': 'test' }, success: function(res){ util.debug(res); } }) }})//控制台提示 WAService.js:1 uploadFile:fail parameter error: parameter.filePath should be String instead of Array; |
别告诉我要循环多次一张张的上传啊?
