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 47f4df7803
commit 5a6b5db082

View File

@ -227,7 +227,8 @@ def upload_image(image_path, file_name=None):
try: try:
# 读取配置文件 # 读取配置文件
config = configparser.ConfigParser() 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): if not os.path.exists(config_path):
logger.error(f"配置文件不存在: {config_path}") logger.error(f"配置文件不存在: {config_path}")
return None return None