Skip to content

Non UTF-8 binary data is corrupted when passed to File() parameter without file name #11800

Discussion options

You must be logged in to vote

Thanks, looks like this one should be reported to starlette. I will do it later.

Regarding the current starlette behaviour. Just for the clarity of this discussion I copy-pasted the note from the link:

As settled in RFC-7578: 4.2, form-data content part that contains file assumed to have name and filename fields in Content-Disposition header: Content-Disposition: form-data; name="user"; filename="somefile". Though filename field is optional according to RFC-7578, it helps Starlette to differentiate which data should be treated as file. If filename field was supplied, UploadFile object will be created to access underlying file, otherwise form-data part will be parsed and available as a ra…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@DenisKuplyakov
Comment options

Answer selected by estebanx64
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants