fix: 上传成功回复显示实际存储桶名称而非配置别名
- 修复上传成功消息中存储桶名称显示问题 - 现在显示七牛云实际 bucket 名称(如 daoqires)而不是配置别名(如 default) - 提升用户体验,避免混淆
This commit is contained in:
@@ -495,6 +495,11 @@ async function doUpload(chatId, feishu, uploader, info) {
|
|||||||
const result = await uploader.upload(tempFile, targetKey, bucket);
|
const result = await uploader.upload(tempFile, targetKey, bucket);
|
||||||
await uploader.refreshCDN(bucket, targetKey);
|
await uploader.refreshCDN(bucket, targetKey);
|
||||||
|
|
||||||
|
// 获取实际存储桶名称(不是配置别名)
|
||||||
|
const fullConfig = loadFullConfig();
|
||||||
|
const bucketConfig = fullConfig.buckets[bucket];
|
||||||
|
const actualBucketName = bucketConfig ? bucketConfig.bucket : bucket;
|
||||||
|
|
||||||
await feishu.sendMessage(chatId, {
|
await feishu.sendMessage(chatId, {
|
||||||
msg_type: 'text',
|
msg_type: 'text',
|
||||||
content: {
|
content: {
|
||||||
@@ -502,7 +507,7 @@ async function doUpload(chatId, feishu, uploader, info) {
|
|||||||
`📦 文件:${targetKey}\n` +
|
`📦 文件:${targetKey}\n` +
|
||||||
`🔗 链接:${result.url}\n` +
|
`🔗 链接:${result.url}\n` +
|
||||||
`💾 原文件:${file_name}\n` +
|
`💾 原文件:${file_name}\n` +
|
||||||
`🪣 存储桶:${bucket}\n` +
|
`🪣 存储桶:${actualBucketName}\n` +
|
||||||
`📁 配置:${path_label}`
|
`📁 配置:${path_label}`
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user