Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix web import url is too long (#6402)

Jyongf55876bcc588
diff --git a/api/services/dataset_service.py b/api/services/dataset_service.py
index 84049712d95..e7af975009e 100644
--- a/api/services/dataset_service.py
+++ b/api/services/dataset_service.py
@@ -845,13 +845,17 @@ class DocumentService:
'only_main_content': website_info.get('only_main_content', False),
'mode': 'crawl',
}
+ if url.length > 255:
+ document_name = url[:200] + '...'
+ else:
+ document_name = url
document = DocumentService.build_document(
dataset, dataset_process_rule.id,
document_data["data_source"]["type"],
document_data["doc_form"],
document_data["doc_language"],
data_source_info, created_from, position,
- account, url, batch
+ account, document_name, batch
)
db.session.add(document)
db.session.flush()