Update requests.md (#1792)

This commit is contained in:
Marcelo Trylesinski 2022-08-06 23:46:06 +02:00 committed by GitHub
parent 0b5b9c45ed
commit d81d8c8d3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -144,8 +144,8 @@ contents = await form["upload_file"].read()
!!! info
As settled in [RFC-7578: 4.2](https://www.ietf.org/rfc/rfc7578.txt), 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
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 raw
string.