调整图片下载目录项目根目录
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user