From 4cf65bd9bd7d984a2745f456bbd94b4e7a229909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A5=AD=E5=9B=A2?= Date: Sat, 7 Mar 2026 15:17:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8A=E4=BC=A0=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=98=BE=E7=A4=BA=E5=AE=9E=E9=99=85=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E6=A1=B6=E5=90=8D=E7=A7=B0=E8=80=8C=E9=9D=9E=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=88=AB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复上传成功消息中存储桶名称显示问题 - 现在显示七牛云实际 bucket 名称(如 daoqires)而不是配置别名(如 default) - 提升用户体验,避免混淆 --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 819bfc7..aadb116 100644 --- a/src/index.js +++ b/src/index.js @@ -495,6 +495,11 @@ async function doUpload(chatId, feishu, uploader, info) { const result = await uploader.upload(tempFile, targetKey, bucket); await uploader.refreshCDN(bucket, targetKey); + // 获取实际存储桶名称(不是配置别名) + const fullConfig = loadFullConfig(); + const bucketConfig = fullConfig.buckets[bucket]; + const actualBucketName = bucketConfig ? bucketConfig.bucket : bucket; + await feishu.sendMessage(chatId, { msg_type: 'text', content: { @@ -502,7 +507,7 @@ async function doUpload(chatId, feishu, uploader, info) { `📦 文件:${targetKey}\n` + `🔗 链接:${result.url}\n` + `💾 原文件:${file_name}\n` + - `🪣 存储桶:${bucket}\n` + + `🪣 存储桶:${actualBucketName}\n` + `📁 配置:${path_label}` } });