From 77c4055c72fc5d0e0becaf3c410ab700f26c220b Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期六, 04 十月 2025 18:57:09 +0800
Subject: [PATCH] fix(auth): 避免在 JWT 过滤器中消费原始 GraphQL 请求体,防止下游读取为空引发 400
---
web/src/utils/cos-simple.ts | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/web/src/utils/cos-simple.ts b/web/src/utils/cos-simple.ts
index 9190707..24a983d 100644
--- a/web/src/utils/cos-simple.ts
+++ b/web/src/utils/cos-simple.ts
@@ -38,16 +38,11 @@
*/
export const uploadToCOS = async (file: File): Promise<string> => {
try {
- console.log('寮�濮嬭幏鍙栦笂浼犲嚟璇�...')
-
// 鑾峰彇涓婁紶鍑瘉
const credentials = await getUploadCredentials()
- console.log('鑾峰彇鍒颁笂浼犲嚟璇�:', credentials)
// 浣跨敤棰勭鍚峌RL
const uploadUrl = credentials.presignedUrl
-
- console.log('寮�濮嬩笂浼犳枃浠跺埌:', uploadUrl)
// 浣跨敤棰勭鍚峌RL涓婁紶鏂囦欢
const uploadResponse = await axios.put(uploadUrl, file, {
@@ -57,7 +52,6 @@
})
if (uploadResponse.status === 200) {
- console.log('鏂囦欢涓婁紶鎴愬姛!')
// 杩斿洖鏂囦欢鐨勮闂甎RL锛堝幓鎺夋煡璇㈠弬鏁帮級
const fileUrl = `https://${credentials.bucket}.cos.${credentials.region}.myqcloud.com/${credentials.key}`
return fileUrl
@@ -66,7 +60,6 @@
}
} catch (error) {
- console.error('涓婁紶鏂囦欢澶辫触:', error)
throw error
}
}
\ No newline at end of file
--
Gitblit v1.8.0