- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for UploadFile (0.13 sec)
-
docs/pt/docs/tutorial/request-files.md
Mas há muitos casos em que você pode se beneficiar do uso de `UploadFile`. ## Parâmetros de Arquivo com `UploadFile` Defina um parâmetro de arquivo com um tipo de `UploadFile`: {* ../../docs_src/request_files/tutorial001_an_py39.py hl[14] *} Utilizar `UploadFile` tem várias vantagens sobre `bytes`: * Você não precisa utilizar o `File()` no valor padrão do parâmetro.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 30 19:52:32 UTC 2024 - 7.8K bytes - Viewed (0) -
docs/en/docs/tutorial/request-files.md
But there are several cases in which you might benefit from using `UploadFile`. ## File Parameters with `UploadFile` Define a file parameter with a type of `UploadFile`: //// tab | Python 3.9+ ```Python hl_lines="14" {!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
docs/em/docs/tutorial/request-files.md
✔️ 🤯 👈 👉 ⛓ 👈 🎂 🎚 🔜 🏪 💾. 👉 🔜 👷 👍 🤪 📁. ✋️ 📤 📚 💼 ❔ 👆 💪 💰 ⚪️➡️ ⚙️ `UploadFile`. ## 📁 🔢 ⏮️ `UploadFile` 🔬 📁 🔢 ⏮️ 🆎 `UploadFile`: ```Python hl_lines="12" {!../../docs_src/request_files/tutorial001.py!} ``` ⚙️ `UploadFile` ✔️ 📚 📈 🤭 `bytes`: * 👆 🚫 ✔️ ⚙️ `File()` 🔢 💲 🔢. * ⚫️ ⚙️ "🧵" 📁:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.6K bytes - Viewed (0) -
docs/de/docs/tutorial/request-files.md
Aber es gibt viele Fälle, in denen Sie davon profitieren, `UploadFile` zu verwenden. ## Datei-Parameter mit `UploadFile` Definieren Sie einen Datei-Parameter mit dem Typ `UploadFile`: //// tab | Python 3.9+ ```Python hl_lines="14" {!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.3K bytes - Viewed (0) -
docs/pt/docs/tutorial/request_files.md
Mas existem vários casos em que você pode se beneficiar ao usar `UploadFile`. ## Parâmetros de arquivo com `UploadFile` Defina um parâmetro de arquivo com o tipo `UploadFile` //// tab | Python 3.9+ ```Python hl_lines="14" {!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.8K bytes - Viewed (0) -
tests/test_multipart_installation.py
import warnings import pytest from fastapi import FastAPI, File, Form, UploadFile from fastapi.dependencies.utils import ( multipart_incorrect_install_error, multipart_not_installed_error, ) def test_incorrect_multipart_installed_form(monkeypatch): monkeypatch.setattr("python_multipart.__version__", "0.0.12") with warnings.catch_warnings(record=True): warnings.simplefilter("always")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 5.7K bytes - Viewed (0) -
tests/test_compat.py
# For coverage # TODO: in theory this would allow declaring types that could be lists of UploadFile # and other types, but I'm not even sure it's a good idea to support it as a first # class "feature" assert is_uploadfile_sequence_annotation(Union[List[str], List[UploadFile]]) def test_is_pv1_scalar_field(): # For coverage class Model(BaseModel):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Sep 11 07:45:30 UTC 2024 - 3.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/request-files.md
文件作为「表单数据」上传。 如果把*路径操作函数*参数的类型声明为 `bytes`,**FastAPI** 将以 `bytes` 形式读取和接收文件内容。 这种方式把文件的所有内容都存储在内存里,适用于小型文件。 不过,很多情况下,`UploadFile` 更好用。 ## 含 `UploadFile` 的文件参数 定义文件参数时使用 `UploadFile`: ```Python hl_lines="12" {!../../docs_src/request_files/tutorial001.py!} ``` `UploadFile` 与 `bytes` 相比有更多优势: * 使用 `spooled` 文件: * 存储在内存的文件超出最大上限时,FastAPI 会把文件存入磁盘; * 这种方式更适于处理图像、视频、二进制文件等大型文件,好处是不会占用所有内存;
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.9K bytes - Viewed (0) -
docs/ru/docs/tutorial/request-files.md
Следует иметь в виду, что все содержимое будет храниться в памяти. Это хорошо подходит для небольших файлов. Однако возможны случаи, когда использование `UploadFile` может оказаться полезным. ## Загрузка файла с помощью `UploadFile` Определите параметр файла с типом `UploadFile`: //// tab | Python 3.9+ ```Python hl_lines="14" {!> ../../docs_src/request_files/tutorial001_an_py39.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 15.3K bytes - Viewed (0) -
docs/ko/docs/tutorial/request-files.md
이것은 전체 내용이 메모리에 저장된다는 것을 의미한다는 걸 염두하기 바랍니다. 이는 작은 크기의 파일들에 적합합니다. 어떤 경우에는 `UploadFile` 을 사용하는 것이 더 유리합니다. ## `File` 매개변수와 `UploadFile` `File` 매개변수를 `UploadFile` 타입으로 정의합니다: ```Python hl_lines="12" {!../../docs_src/request_files/tutorial001.py!} ``` `UploadFile` 을 사용하는 것은 `bytes` 과 비교해 다음과 같은 장점이 있습니다: * "스풀 파일"을 사용합니다. * 최대 크기 제한까지만 메모리에 저장되며, 이를 초과하는 경우 디스크에 저장됩니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.1K bytes - Viewed (0)