fix(image): 处理绝对路径和相对路径的文件路径转换

This commit is contained in:
SXP-Simon
2026-02-22 15:33:01 +08:00
parent ba30818212
commit e4819c866d
2 changed files with 10 additions and 2 deletions
+4 -1
View File
@@ -328,7 +328,10 @@ class GroupDailyAnalysis(Star):
parts = image_url.split(",", 1)
data = base64.b64decode(parts[1]) if len(parts) == 2 else None
elif os.path.isfile(image_url):
image_file = os.path.abspath(image_url)
if os.path.isabs(image_url):
image_file = image_url
else:
image_file = os.path.abspath(image_url)
data = None
else:
return