From d8119d71b8b8c8c94ae94a1e69bcd24723ff36db Mon Sep 17 00:00:00 2001 From: asforest Date: Tue, 10 Dec 2024 12:32:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=8E=A5=E5=8F=A3=E4=B8=8D=E5=8C=85=E5=90=AB?= =?UTF-8?q?token=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/fs.js | 2 ++ 1 file changed, 2 insertions(+) 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) },