Skip to content

Commit

Permalink
修复vite版本上传文件无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
cq-panda committed Apr 7, 2024
1 parent b6f2e57 commit 5b993ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Vol.Vue3.Vite/src/components/basic/VolUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,11 @@ export default {
// forms.append("fileInput", this.files);
this.http
.post(this.url+paramText, forms, this.autoUpload ? '正在上传文件' : '')
.post(this.url+paramText, forms, this.autoUpload ? '正在上传文件' : '',
//高版本axios这里必须要指定header
{
headers:{'Content-Type':'multipart/form-data'}
})
.then(
(x) => {
// this.$refs.uploadFile.clearFiles();
Expand Down

0 comments on commit 5b993ff

Please sign in to comment.