Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for fileb_content_type (0.06 sec)

  1. docs_src/request_forms_and_files/tutorial001_py39.py

    
    @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,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 317 bytes
    - Viewed (0)
  2. docs_src/request_forms_and_files/tutorial001_an_py39.py

        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,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 386 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

            )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "file_size": 14,
            "token": "foo",
            "fileb_content_type": "text/plain",
        }
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.3K bytes
    - Viewed (0)
Back to top