var fd = new FormData()
fd.append('file', files[0])
let config = {
headers: {
'Content-Type': 'multipart/form-data'
}
}
axios.post(that.uploadUrl, fd,config).then( res => {
console.log(res)
}).catch( res => {
console.log(res)
})
axios配置后,post提交formdata
最新推荐文章于 2024-08-08 10:15:42 发布