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(file_factory): Remove transfer_method validation (#11207)

-LAN-0554898b5df2
diff --git a/api/factories/file_factory.py b/api/factories/file_factory.py
index d866195f256..8538775a672 100644
--- a/api/factories/file_factory.py
+++ b/api/factories/file_factory.py
@@ -244,9 +244,6 @@ def _is_file_valid_with_config(
):
return False
- if config.allowed_file_upload_methods and file_transfer_method not in config.allowed_file_upload_methods:
- return False
-
if input_file_type == FileType.IMAGE and config.image_config:
if config.image_config.transfer_methods and file_transfer_method not in config.image_config.transfer_methods:
return False
diff --git a/web/app/components/base/file-uploader/hooks.ts b/web/app/components/base/file-uploader/hooks.ts
index b4c8fe10088..256202d7836 100644
--- a/web/app/components/base/file-uploader/hooks.ts
+++ b/web/app/components/base/file-uploader/hooks.ts
@@ -211,7 +211,7 @@ export const useFile = (fileConfig: FileUpload) => {
type: '',
size: 0,
progress: 0,
- transferMethod: TransferMethod.remote_url,
+ transferMethod: TransferMethod.local_file,
supportFileType: '',
url,
isRemote: true,