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.

chore: save uploaded file extension as lower case (#10111)

非法操作e36f5cb36615
diff --git a/api/services/file_service.py b/api/services/file_service.py
index 6193a39669a..521a666044c 100644
--- a/api/services/file_service.py
+++ b/api/services/file_service.py
@@ -35,7 +35,7 @@ class FileService:
filename = file.filename
if not filename:
raise FileNotExistsError
- extension = filename.split(".")[-1]
+ extension = filename.split(".")[-1].lower()
if len(filename) > 200:
filename = filename.split(".")[0][:200] + "." + extension