fix: Zip with title cannot be parsed (#2683)
This commit is contained in:
parent
f9d536f5a2
commit
55cdd0a708
@ -28,6 +28,7 @@ from common.util.common import parse_md_image
|
|||||||
from dataset.models import Image
|
from dataset.models import Image
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
class FileBufferHandle:
|
class FileBufferHandle:
|
||||||
buffer = None
|
buffer = None
|
||||||
|
|
||||||
@ -75,6 +76,7 @@ def get_image_list(result_list: list, zip_files: List[str]):
|
|||||||
if search:
|
if search:
|
||||||
new_image_id = str(uuid.uuid1())
|
new_image_id = str(uuid.uuid1())
|
||||||
source_image_path = search.group().replace('(', '').replace(')', '')
|
source_image_path = search.group().replace('(', '').replace(')', '')
|
||||||
|
source_image_path = source_image_path.strip().split(" ")[0]
|
||||||
image_path = urljoin(result.get('name'), '.' + source_image_path if source_image_path.startswith(
|
image_path = urljoin(result.get('name'), '.' + source_image_path if source_image_path.startswith(
|
||||||
'/') else source_image_path)
|
'/') else source_image_path)
|
||||||
if not zip_files.__contains__(image_path):
|
if not zip_files.__contains__(image_path):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user