Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for upload_file (0.51 sec)

  1. docs/en/docs/reference/uploadfile.md

    # `UploadFile` class
    
    You can define *path operation function* parameters to be of the type `UploadFile` to receive files from the request.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import UploadFile
    ```
    
    ::: fastapi.UploadFile
        options:
            members:
                - file
                - filename
                - size
                - headers
                - content_type
                - read
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 472 bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/request-files.md

    ✔️ 🤯 👈 👉 ⛓ 👈 🎂 🎚 🔜 🏪 💾. 👉 🔜 👷 👍 🤪 📁.
    
    ✋️ 📤 📚 💼 ❔ 👆 💪 💰 ⚪️➡️ ⚙️ `UploadFile`.
    
    ## 📁 🔢 ⏮️ `UploadFile`
    
    🔬 📁 🔢 ⏮️ 🆎 `UploadFile`:
    
    ```Python hl_lines="12"
    {!../../../docs_src/request_files/tutorial001.py!}
    ```
    
    ⚙️ `UploadFile` ✔️ 📚 📈 🤭 `bytes`:
    
    * 👆 🚫 ✔️ ⚙️ `File()` 🔢 💲 🔢.
    * ⚫️ ⚙️ "🧵" 📁:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/request-files.md

    이것은 전체 내용이 메모리에 저장된다는 것을 의미한다는 걸 염두하기 바랍니다. 이는 작은 크기의 파일들에 적합합니다.
    
    어떤 경우에는 `UploadFile` 을 사용하는 것이 더 유리합니다.
    
    ## `File` 매개변수와  `UploadFile`
    
    `File` 매개변수를 `UploadFile` 타입으로 정의합니다:
    
    ```Python hl_lines="12"
    {!../../../docs_src/request_files/tutorial001.py!}
    ```
    
    `UploadFile` 을 사용하는 것은 `bytes` 과 비교해 다음과 같은 장점이 있습니다:
    
    * "스풀 파일"을 사용합니다.
        *  최대 크기 제한까지만 메모리에 저장되며, 이를 초과하는 경우 디스크에 저장됩니다.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/request-forms-and-files.md

        ```
    
    Файлы и поля формы будут загружены в виде данных формы, и вы получите файлы и поля формы.
    
    Вы можете объявить некоторые файлы как `bytes`, а некоторые - как `UploadFile`.
    
    !!! warning "Внимание"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  5. 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 会把文件存入磁盘;
    * 这种方式更适于处理图像、视频、二进制文件等大型文件,好处是不会占用所有内存;
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/request-files.md

    Следует иметь в виду, что все содержимое будет храниться в памяти. Это хорошо подходит для небольших файлов.
    
    Однако возможны случаи, когда использование `UploadFile` может оказаться полезным.
    
    ## Загрузка файла с помощью `UploadFile`
    
    Определите параметр файла с типом `UploadFile`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.6+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. docs/de/docs/reference/uploadfile.md

    # `UploadFile`-Klasse
    
    Sie können *Pfadoperation-Funktionsparameter* als Parameter vom Typ `UploadFile` definieren, um Dateien aus dem Request zu erhalten.
    
    Sie können es direkt von `fastapi` importieren:
    
    ```python
    from fastapi import UploadFile
    ```
    
    ::: fastapi.UploadFile
        options:
            members:
                - file
                - filename
                - size
                - headers
                - content_type
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:17:09 GMT 2024
    - 495 bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/request-forms-and-files.md

        ```
    
    The files and form fields will be uploaded as form data and you will receive the files and form fields.
    
    And you can declare some of the files as `bytes` and some as `UploadFile`.
    
    !!! warning
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 2K bytes
    - Viewed (0)
  9. docs/en/docs/release-notes.md

    ## 0.73.0
    
    ### Features
    
    * ✨ Add support for declaring `UploadFile` parameters without explicit `File()`. PR [#4469](https://github.com/tiangolo/fastapi/pull/4469) by [@tiangolo](https://github.com/tiangolo). New docs: [Request Files - File Parameters with UploadFile](https://fastapi.tiangolo.com/tutorial/request-files/#file-parameters-with-uploadfile).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  10. docs/en/docs/tutorial/request-files.md

    Keep in mind that this means that the whole contents will be stored in memory. This will work well for small files.
    
    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`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top