From d49f448a5f9c880c02de371edf380671d164189a Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 26 Jun 2025 17:00:44 +0800 Subject: [PATCH] fix: correct image path replacement logic in zip_split_handle --- apps/common/handle/impl/text/zip_split_handle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/handle/impl/text/zip_split_handle.py b/apps/common/handle/impl/text/zip_split_handle.py index bb67a808..1f053c7e 100644 --- a/apps/common/handle/impl/text/zip_split_handle.py +++ b/apps/common/handle/impl/text/zip_split_handle.py @@ -85,19 +85,19 @@ def get_image_list(result_list: list, zip_files: List[str]): if not zip_files.__contains__(image_path): continue if image_path.startswith('oss/file/') or image_path.startswith('oss/image/'): - image_id = image_path.replace('oss/file/', '').replace('oss/image/', '') + image_id = image_path.replace('oss/file/', '').replace('oss/file/', '') if is_valid_uuid(image_id): image_file_list.append({'source_file': image_path, 'image_id': image_id}) else: image_file_list.append({'source_file': image_path, 'image_id': new_image_id}) - content = content.replace(source_image_path, f'/oss/image/{new_image_id}') + content = content.replace(source_image_path, f'/oss/file/{new_image_id}') p['content'] = content else: image_file_list.append({'source_file': image_path, 'image_id': new_image_id}) - content = content.replace(source_image_path, f'/oss/image/{new_image_id}') + content = content.replace(source_image_path, f'/oss/file/{new_image_id}') p['content'] = content return image_file_list