diff --git a/src/api/fs.js b/src/api/fs.js index 6f4b6fb..e8c80d8 100644 --- a/src/api/fs.js +++ b/src/api/fs.js @@ -1,5 +1,6 @@ import instance from "@/utils/request.js"; import axios from "axios"; +import store from "@/store/index.js"; export const fsDiskInfoRequest = () => instance.post('/fs/disk-info', {}) @@ -14,6 +15,7 @@ export const fsSignFileRequest = (path = '') => instance.post('/fs/sign-file', { export const fsUploadRequest = (path = '', file, onProgress) => { return axios.post(`${import.meta.env.VITE_API_URL}/fs/upload`, file, { headers: { + 'Token': store.getState().user.token, 'Content-Type': 'application/octet-stream', 'Path': encodeURIComponent(path) },