Non UTF-8 binary data is corrupted when passed to File() parameter without file name #11800
Unanswered
DenisKuplyakov
asked this question in
Questions
Replies: 1 comment
-
See the Note box at the bottom of this page referencing rfc 7578 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
Non UTF-8 data got corrupted if passed to
File()
parameter without filename specified. Given code sends two bytes\xc3\x28
, but, if no filename provided, length of the data in path operation equals to 3.To reproduce by
TestClient
just run the provided code.To reproduce by curl:
uvicorn test:app
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.111.0
Pydantic Version
2.7.4
Python Version
3.8.10
Additional Context
Other packages versions that, I think, may affect:
Beta Was this translation helpful? Give feedback.
All reactions