ios提交不了上传文件的参数?
我想上传视频,安卓和pc上传都正常,后台可以正常接收参数,但是ios上传就接收不到参数,直接收到的null
代码如下
shangchuan(){
const that = this;
wx.chooseMedia({
count: 1,
mediaType: 'video',
sourceType: ['album', 'camera'],
maxDuration: 15,
camera: 'back',
success(res) {
console.log(res)
wx.showLoading({
title: '上传中...',
mask:true
})
const tempFilePaths = res.tempFiles[0].tempFilePath
wx.uploadFile({
url: getApp().api.insertvideo,
filePath:tempFilePaths,
compressed:true,
method: 'POST',
header: {
'content-type':'multipart/form-data'
},
name: 'file',
formData: {
'goodsid':that.data.goodsid
},
success (res){
console.log(res)
that.loadData();
},error(err){
console.log(err)
}
})
}
})
},