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)