From 063da0bf961e1d35e25dc107f883f7492f4c5a7c Mon Sep 17 00:00:00 2001
From: chenzhaoyang <czy@slooong.com>
Date: 星期三, 17 十二月 2025 10:08:38 +0800
Subject: [PATCH] Merge branch 'develop' of http://git.slooong.com/r/label-studio into develop
---
label_studio/data_export/api.py | 10 ----------
label_studio/data_export/mixins.py | 3 ++-
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/label_studio/data_export/api.py b/label_studio/data_export/api.py
index 60b5dba..0bd4832 100644
--- a/label_studio/data_export/api.py
+++ b/label_studio/data_export/api.py
@@ -207,11 +207,6 @@
only_finished = not query_serializer.validated_data['download_all_tasks']
download_resources = query_serializer.validated_data['download_resources']
interpolate_key_frames = query_serializer.validated_data['interpolate_key_frames']
-
- # COCO 格式特殊处理:强制下载资源并规范化图片URL
- if export_type == 'COCO':
- download_resources = True
- logger.debug(f'COCO export: forced download_resources=True')
tasks_ids = request.GET.getlist('ids[]')
@@ -702,11 +697,6 @@
serializer.is_valid(raise_exception=True)
export_type = serializer.validated_data['export_type']
download_resources = serializer.validated_data.get('download_resources')
-
- # COCO 格式特殊处理:强制下载资源
- if export_type == 'COCO':
- download_resources = True
- logger.debug(f'COCO export conversion: forced download_resources=True')
converted_format, created = ConvertedFormat.objects.exclude(
status=ConvertedFormat.Status.FAILED
diff --git a/label_studio/data_export/mixins.py b/label_studio/data_export/mixins.py
index 0d084f7..d41e521 100644
--- a/label_studio/data_export/mixins.py
+++ b/label_studio/data_export/mixins.py
@@ -2,6 +2,7 @@
import io
import json
import logging
+import os
import pathlib
import shutil
from datetime import datetime
@@ -351,7 +352,7 @@
converter = Converter(
config=self.project.get_parsed_config(),
project_dir=None,
- upload_dir=out_dir,
+ upload_dir=os.path.join(settings.MEDIA_ROOT, settings.UPLOAD_DIR),
download_resources=download_resources,
# for downloading resource we need access to the API
access_token=self.project.organization.created_by.auth_token.key,
--
Gitblit v1.9.3