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: return null url when upload local file (#17752)

kautsar_masuara0e0220bdbf08
diff --git a/api/services/file_service.py b/api/services/file_service.py
index 284e96c97ad..b4442c36c38 100644
--- a/api/services/file_service.py
+++ b/api/services/file_service.py
@@ -92,6 +92,11 @@ class FileService:
db.session.add(upload_file)
db.session.commit()
+ if not upload_file.source_url:
+ upload_file.source_url = file_helpers.get_signed_file_url(upload_file_id=upload_file.id)
+ db.session.add(upload_file)
+ db.session.commit()
+
return upload_file
@staticmethod