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:microsoft word text copy and paste error (#14905)

ShadowJobs0587eb49567b
diff --git a/web/app/components/base/file-uploader/hooks.ts b/web/app/components/base/file-uploader/hooks.ts
index b4c8fe10088..7c82e0a04e5 100644
--- a/web/app/components/base/file-uploader/hooks.ts
+++ b/web/app/components/base/file-uploader/hooks.ts
@@ -310,7 +310,8 @@ export const useFile = (fileConfig: FileUpload) => {
const handleClipboardPasteFile = useCallback((e: ClipboardEvent<HTMLTextAreaElement>) => {
const file = e.clipboardData?.files[0]
- if (file) {
+ const text = e.clipboardData?.getData('text/plain')
+ if (file && !text) {
e.preventDefault()
handleLocalFileUpload(file)
}