Skip to content

Commit

Permalink
fix(file upload): correct upload method key for image config (#9568)
Browse files Browse the repository at this point in the history
  • Loading branch information
laipz8200 authored Oct 21, 2024
1 parent 5459d81 commit 4ae0bb8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/core/app/app_config/features/file_upload/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ def convert(cls, config: Mapping[str, Any], is_vision: bool = True):
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,
}
}

Expand Down

0 comments on commit 4ae0bb8

Please sign in to comment.