Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 201 for fileb (0.2 sec)

  1. docs_src/request_forms_and_files/tutorial001_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, File, Form, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(
        file: Annotated[bytes, File()],
        fileb: Annotated[UploadFile, File()],
        token: Annotated[str, Form()],
    ):
        return {
            "file_size": len(file),
            "token": token,
            "fileb_content_type": fileb.content_type,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 386 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py

                "schemas": {
                    "Body_create_file_files__post": {
                        "title": "Body_create_file_files__post",
                        "required": ["file", "fileb", "token"],
                        "type": "object",
                        "properties": {
                            "file": {"title": "File", "type": "string", "format": "binary"},
                            "fileb": {
                                "title": "Fileb",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

                "schemas": {
                    "Body_create_file_files__post": {
                        "title": "Body_create_file_files__post",
                        "required": ["file", "fileb", "token"],
                        "type": "object",
                        "properties": {
                            "file": {"title": "File", "type": "string", "format": "binary"},
                            "fileb": {
                                "title": "Fileb",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  4. docs_src/request_forms_and_files/tutorial001_an.py

    from fastapi import FastAPI, File, Form, UploadFile
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(
        file: Annotated[bytes, File()],
        fileb: Annotated[UploadFile, File()],
        token: Annotated[str, Form()],
    ):
        return {
            "file_size": len(file),
            "token": token,
            "fileb_content_type": fileb.content_type,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 396 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

                "schemas": {
                    "Body_create_file_files__post": {
                        "title": "Body_create_file_files__post",
                        "required": ["file", "fileb", "token"],
                        "type": "object",
                        "properties": {
                            "file": {"title": "File", "type": "string", "format": "binary"},
                            "fileb": {
                                "title": "Fileb",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  6. docs_src/request_forms_and_files/tutorial001.py

    from fastapi import FastAPI, File, Form, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(
        file: bytes = File(), fileb: UploadFile = File(), token: str = Form()
    ):
        return {
            "file_size": len(file),
            "token": token,
            "fileb_content_type": fileb.content_type,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 317 bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/request-files.md

    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”ฌ ๐Ÿ“ ๐Ÿ“‚ ๐Ÿ‘ฉโ€๐Ÿ’ป โš™๏ธ `File`.
    
    !!! info
        ๐Ÿ“จ ๐Ÿ“‚ ๐Ÿ“, ๐Ÿฅ‡ โŽ <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>.
    
        ๐Ÿคถ โ“‚. `pip install python-multipart`.
    
        ๐Ÿ‘‰ โ†ฉ๏ธ ๐Ÿ“‚ ๐Ÿ“ ๐Ÿ“จ "๐Ÿ“จ ๐Ÿ’ฝ".
    
    ## ๐Ÿ—„ `File`
    
    ๐Ÿ—„ `File` &amp; `UploadFile` โšช๏ธโžก๏ธ `fastapi`:
    
    ```Python hl_lines="1"
    {!../../../docs_src/request_files/tutorial001.py!}
    ```
    
    ## ๐Ÿ”ฌ `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)
  8. docs/ko/docs/tutorial/request-files.md

    ```
    
    ## `File` ๋งค๊ฐœ๋ณ€์ˆ˜ ์ •์˜
    
    `Body` ๋ฐ `Form` ๊ณผ ๋™์ผํ•œ ๋ฐฉ์‹์œผ๋กœ ํŒŒ์ผ์˜ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค:
    
    ```Python hl_lines="7"
    {!../../../docs_src/request_files/tutorial001.py!}
    ```
    
    !!! info "์ •๋ณด"
        `File` ์€ `Form` ์œผ๋กœ๋ถ€ํ„ฐ ์ง์ ‘ ์ƒ์†๋œ ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค.
    
        ํ•˜์ง€๋งŒ `fastapi`๋กœ๋ถ€ํ„ฐ `Query`, `Path`, `File` ๋“ฑ์„ ์ž„ํฌํŠธ ํ•  ๋•Œ, ์ด๊ฒƒ๋“ค์€ ํŠน๋ณ„ํ•œ ํด๋ž˜์Šค๋“ค์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜๋ผ๋Š” ๊ฒƒ์„ ๊ธฐ์–ตํ•˜๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.
    
    !!! tip "ํŒ"
        File์˜ ๋ณธ๋ฌธ์„ ์„ ์–ธํ•  ๋•Œ, ๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ์ฟผ๋ฆฌ ๋งค๊ฐœ๋ณ€์ˆ˜ ๋˜๋Š” ๋ณธ๋ฌธ(JSON) ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ํ•ด์„๋˜๋Š”  ๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด `File` ์„ ์‚ฌ์šฉํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
    
    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)
  9. docs/en/docs/tutorial/static-files.md

    # Static Files
    
    You can serve static files automatically from a directory using `StaticFiles`.
    
    ## Use `StaticFiles`
    
    * Import `StaticFiles`.
    * "Mount" a `StaticFiles()` instance in a specific path.
    
    ```Python hl_lines="2  6"
    {!../../../docs_src/static_files/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
        You could also use `from starlette.staticfiles import StaticFiles`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 19:56:09 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/request-forms-and-files.md

        ```
    
    === "Python 3.6+"
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
        ```
    
    === "Python 3.6+ ะฑะตะท Annotated"
    
        !!! tip "ะŸะพะดัะบะฐะทะบะฐ"
            ะŸั€ะตะดะฟะพั‡ั‚ะธั‚ะตะปัŒะฝะตะต ะธัะฟะพะปัŒะทะพะฒะฐั‚ัŒ ะฒะตั€ัะธัŽ ั ะฐะฝะฝะพั‚ะฐั†ะธะตะน, ะตัะปะธ ัั‚ะพ ะฒะพะทะผะพะถะฝะพ.
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/request_forms_and_files/tutorial001.py!}
        ```
    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)
Back to top