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: Resolved the issue of duplicate display of supported file types during text file upload (#2241)

Moonlitd8f8afcbd0af
diff --git a/web/app/components/datasets/create/file-uploader/index.tsx b/web/app/components/datasets/create/file-uploader/index.tsx
index 4e02a1fb924..3b8146a5d9f 100644
--- a/web/app/components/datasets/create/file-uploader/index.tsx
+++ b/web/app/components/datasets/create/file-uploader/index.tsx
@@ -72,6 +72,8 @@ const FileUploader = ({
return item
})
+ res = res.map(item => item.toLowerCase())
+ res = res.filter((item, index, self) => self.indexOf(item) === index)
return res.map(item => item.toUpperCase()).join(language !== LanguagesSupportedUnderscore[1] ? ', ' : '、 ')
})()