const five = async (file: any) => {
const formData = new FormData()
formData.append('file', new Blob([file.file]))
return await axios.post<any, any>(FIVE_UPLOAD_URL, formData, {
//FIVE_UPLOAD_URL 是文件上传的服务器地址
headers: {
'Content-Type':
'multipart/form-data; boundary=--------------------------202516566847018785837625',
},
})
}
先将文件变成blob类型
new Blob(file.file)