From: Sebastián Ramírez Date: Mon, 4 Mar 2019 07:07:15 +0000 (+0400) Subject: :memo: Clarify uploadfile async method calls X-Git-Tag: 0.7.1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7658d0af16fabe04f74d3aecec45ea85f042730d;p=thirdparty%2Ffastapi%2Ffastapi.git :memo: Clarify uploadfile async method calls --- diff --git a/docs/tutorial/request-files.md b/docs/tutorial/request-files.md index ee5c9b7d4d..bc73dd25e7 100644 --- a/docs/tutorial/request-files.md +++ b/docs/tutorial/request-files.md @@ -63,8 +63,8 @@ Using `UploadFile` has several advantages over `bytes`: * `write(data)`: Writes `data` (`str` or `bytes`) to the file. * `read(size)`: Reads `size` (`int`) bytes/characters of the file. * `seek(offset)`: Goes to the byte position `offset` (`int`) in the file. - * E.g., `myfile.seek(0)` would go to the start of the file. - * This is especially useful if you run `myfile.read()` once and then need to read the contents again. + * E.g., `await myfile.seek(0)` would go to the start of the file. + * This is especially useful if you run `await myfile.read()` once and then need to read the contents again. * `close()`: Closes the file. As all these methods are `async` methods, you need to "await" them.