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: skip file format check of mime types for generated files by tools (#17455)

Bowen Liangfcd5fcca83be
diff --git a/api/factories/file_factory.py b/api/factories/file_factory.py
index 60de7a11b55..b69621ba5b0 100644
--- a/api/factories/file_factory.py
+++ b/api/factories/file_factory.py
@@ -253,8 +253,6 @@ def _build_from_tool_file(
extension = "." + tool_file.file_key.split(".")[-1] if "." in tool_file.file_key else ".bin"
file_type = _standardize_file_type(extension=extension, mime_type=tool_file.mimetype)
- if file_type.value != mapping.get("type", "custom"):
- raise ValueError("Detected file type does not match the specified type. Please verify the file.")
return File(
id=mapping.get("id"),