小程式之上傳圖片——wx.uploadFile()
阿新 • • 發佈:2019-02-12
js程式碼
uploadFile: function () { wx.chooseImage({ success: function (res) {console.log(res); var path=res.tempFilePaths[0]; wx.uploadFile({ url: 'https://www.minshu.xin/My/index.php/Home/Index/uploadfile', filePath: path, name: 'file', formData:{ data1:"w"
},
後端程式碼: