|
@@ -50,6 +50,7 @@
|
|
|
|
|
|
<script setup lang="ts" name="FileUpload">
|
|
|
import { propTypes } from '@/utils/propTypes';
|
|
|
+import { getToken } from '@/utils/auth';
|
|
|
import { download2, globalHeaders } from '@/utils/request';
|
|
|
import { v1 as uuidv1 } from 'uuid';
|
|
|
import axios from 'axios';
|
|
@@ -183,7 +184,8 @@ const uploadByPieces = async (url, { fileName, file }) => {
|
|
|
data,
|
|
|
params,
|
|
|
headers: {
|
|
|
- 'Content-Type': 'multipart/form-data'
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
|
+ 'Authorization': 'Bearer ' + getToken()
|
|
|
}
|
|
|
})
|
|
|
.then((res) => {
|