fix: Update config file path for image upload utility
This commit is contained in:
parent
47f4df7803
commit
5a6b5db082
3
utils.py
3
utils.py
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user