From 40fc1fcb5d87be7497c6cf63d160c2fe33e5816f Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 10 Apr 2025 10:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BE=E7=89=87=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E7=9B=AE=E5=BD=95=E9=A1=B9=E7=9B=AE=E6=A0=B9=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/wechat/message_to_db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/wechat/message_to_db.py b/utils/wechat/message_to_db.py index 8ecfc3a..120fe32 100644 --- a/utils/wechat/message_to_db.py +++ b/utils/wechat/message_to_db.py @@ -35,7 +35,8 @@ class MessageStorage: # 图片处理相关初始化 self.image_executor = concurrent.futures.ThreadPoolExecutor(max_workers=3) # 专用于图片处理的线程池 self.image_tasks = [] - self.image_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "static", "images") + # 修改为项目根目录下的 static/images + self.image_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "static", "images") # 确保图片存储目录存在 if not os.path.exists(self.image_dir): os.makedirs(self.image_dir, exist_ok=True)