From 6d49bf5346bdf97d6af8b53454f96d9d99396714 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Mon, 28 Apr 2025 23:49:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20=5Fhandle=5Ffile=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B8=8B=E7=9A=84=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/platform/sources/gewechat/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astrbot/core/platform/sources/gewechat/client.py b/astrbot/core/platform/sources/gewechat/client.py index 44c54952..43dcf3eb 100644 --- a/astrbot/core/platform/sources/gewechat/client.py +++ b/astrbot/core/platform/sources/gewechat/client.py @@ -328,9 +328,9 @@ class SimpleGewechatClient: if not os.path.exists(self.staged_files[file_token]): logger.warning(f"请求的文件 {self.staged_files[file_token]} 不存在。") return quart.abort(404) - file_token = self.staged_files[file_token] + file_path = self.staged_files[file_token] self.staged_files.pop(file_token, None) - return await quart.send_file(file_token) + return await quart.send_file(file_path) async def _set_callback_url(self): logger.info("设置回调,请等待...")