fix: Update config file path for image upload utility

This commit is contained in:
Ching L 2025-03-06 09:22:33 +08:00
parent 9c27bc6eb7
commit d6bacd71dc

View File

@ -227,7 +227,8 @@ def upload_image(image_path, file_name=None):
try:
# 读取配置文件
config = configparser.ConfigParser()
config_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'env.ini')
# config_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'env.ini')
config_path = './env.ini'
if not os.path.exists(config_path):
logger.error(f"配置文件不存在: {config_path}")
return None