今天在小程式上傳檔案的時候在header攜帶了自定義的資料然后給我報錯了Invalid character in header
我以為是我后端的資料處理錯誤除錯了一下發現是開發工具根本沒發送出去,小程式的header沒有修復?

解決代碼
var header={}
header['tok']=123
wx.uploadFile({
url: 'http://localhost:3000/upload',
filePath:res.tempFiles[0].path,
name: res.tempFiles[0].name,
header,
必須要這樣添加資料才行直接在header會報錯
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/386550.html
標籤:其他
上一篇:基于springboot旅游系統
下一篇:DBUtils工具類實作增刪改查
