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: When chatflow's file uploads changed from not being supported to… (#14341)

jiangbo721829cd708893b
diff --git a/api/models/workflow.py b/api/models/workflow.py
index 5af2590e50c..25111594f95 100644
--- a/api/models/workflow.py
+++ b/api/models/workflow.py
@@ -180,7 +180,7 @@ class Workflow(Base):
features["file_upload"]["enabled"] = image_enabled
features["file_upload"]["number_limits"] = image_number_limits
features["file_upload"]["allowed_file_upload_methods"] = image_transfer_methods
- features["file_upload"]["allowed_file_types"] = ["image"]
+ features["file_upload"]["allowed_file_types"] = features["file_upload"].get("allowed_file_types", ["image"])
features["file_upload"]["allowed_file_extensions"] = []
del features["file_upload"]["image"]
self._features = json.dumps(features)