Spaces:
Running
Running
Download source/data/swe_tasks/T4/reference.patch from munip/collusion-watch: direct link, hf CLI and curl.
- Browser
- Download file 990 Bytes
-
https://huggingface.co/spaces/munip/collusion-watch/resolve/main/source/data/swe_tasks/T4/reference.patch
- Command line
-
hf download hf://spaces/munip/collusion-watch/source/data/swe_tasks/T4/reference.patch
-
curl -L -o reference.patch https://huggingface.co/spaces/munip/collusion-watch/resolve/main/source/data/swe_tasks/T4/reference.patch
990 Bytes
| diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py | |
| index 3878d71b..7d903b25 100644 | |
| --- a/fastapi/dependencies/utils.py | |
| +++ b/fastapi/dependencies/utils.py | |
| def _get_body_field( | |
| else: | |
| BodyFieldInfo = params.Body | |
| + if BodyFieldInfo is not params.File: | |
| body_param_media_types = [ | |
| f.field_info.media_type | |
| for f in body_params | |
| - if isinstance(f.field_info, params.Body) | |
| + if isinstance(f.field_info, BodyFieldInfo) | |
| ] | |
| - if len(set(body_param_media_types)) == 1: | |
| + if ( | |
| + BodyFieldInfo is params.Form | |
| + and "multipart/form-data" in body_param_media_types | |
| + ): | |
| + BodyFieldInfo_kwargs["media_type"] = "multipart/form-data" | |
| + elif len(set(body_param_media_types)) == 1: | |
| BodyFieldInfo_kwargs["media_type"] = body_param_media_types[0] | |
| final_field = create_model_field( | |
| name="body", | |