优化ucloud取文件为空时的判断

This commit is contained in:
2024-06-19 16:52:17 +08:00
parent cd81be7378
commit 501d62f9ce
2 changed files with 4 additions and 2 deletions

View File

@@ -13,8 +13,8 @@ from ucloud import ucloud
def write_visual_result(image, layout=None, result=None):
img = re.split(r'[\\/]', image)[-1]
img = img.split("?")[0]
img = image.split("?")[0]
img = re.split(r'[\\/]', img)[-1]
img_name = ""
img_type = "jpg"
last_dot_index = img.rfind(".")