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 upload): correct upload method key for image config (#9568)

-LAN-4ae0bb83f1d1
diff --git a/api/core/app/app_config/features/file_upload/manager.py b/api/core/app/app_config/features/file_upload/manager.py
index 12037f85708..42beec25354 100644
--- a/api/core/app/app_config/features/file_upload/manager.py
+++ b/api/core/app/app_config/features/file_upload/manager.py
@@ -17,10 +17,13 @@ class FileUploadConfigManager:
file_upload_dict = config.get("file_upload")
if file_upload_dict:
if file_upload_dict.get("enabled"):
+ transform_methods = file_upload_dict.get("allowed_file_upload_methods") or file_upload_dict.get(
+ "allowed_upload_methods", []
+ )
data = {
"image_config": {
"number_limits": file_upload_dict["number_limits"],
- "transfer_methods": file_upload_dict["allowed_upload_methods"],
+ "transfer_methods": transform_methods,
}
}