Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 46 for file_sizes (0.09 seconds)

  1. docs_src/request_files/tutorial001_03_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes, File(description="A file read as bytes")]):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: Annotated[UploadFile, File(description="A file read as UploadFile")],
    ):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 421 bytes
    - Click Count (0)
  2. docs_src/request_files/tutorial001_02_an_py310.py

    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes | None, File()] = None):
        if not file:
            return {"message": "No file sent"}
        else:
            return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: UploadFile | None = None):
        if not file:
            return {"message": "No upload file sent"}
        else:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 505 bytes
    - Click Count (0)
  3. tests/test_tutorial/test_request_files/test_tutorial001.py

        path.write_bytes(b"<file content>")
    
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_large_file(tmp_path, client: TestClient):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
        path.write_bytes(b"x" * (default_pydantic_max_size + 1))
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 7.1K bytes
    - Click Count (0)
  4. docs_src/request_files/tutorial001_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes, File()]):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: UploadFile):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 322 bytes
    - Click Count (0)
  5. docs_src/request_files/tutorial001_py39.py

    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: bytes = File()):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: UploadFile):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 282 bytes
    - Click Count (0)
  6. src/main/java/jcifs/smb1/smb1/SmbComQueryInformationResponse.java

            return ("SmbComQueryInformationResponse[" + super.toString() + ",fileAttributes=0x" + Hexdump.toHexString(fileAttributes, 4)
                    + ",lastWriteTime=" + new Date(lastWriteTime) + ",fileSize=" + fileSize + "]");
        }
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 2.7K bytes
    - Click Count (0)
  7. docs_src/request_files/tutorial001_03_py39.py

    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: bytes = File(description="A file read as bytes")):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: UploadFile = File(description="A file read as UploadFile"),
    ):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 371 bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationResponseTest.java

            long lastWriteTime = System.currentTimeMillis();
            int fileSize = 12345678;
    
            SMBUtil.writeInt2(fileAttributes, buffer, bufferIndex);
            SMBUtil.writeUTime(lastWriteTime, buffer, bufferIndex + 2);
            SMBUtil.writeInt4(fileSize, buffer, bufferIndex + 6);
    
            // Read the data
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11.9K bytes
    - Click Count (0)
  9. docs_src/request_files/tutorial001_02_py39.py

    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Union[bytes, None] = File(default=None)):
        if not file:
            return {"message": "No file sent"}
        else:
            return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: Union[UploadFile, None] = None):
        if not file:
            return {"message": "No upload file sent"}
        else:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 508 bytes
    - Click Count (0)
  10. src/main/java/jcifs/internal/smb1/com/SmbComQueryInformationResponse.java

            return ("SmbComQueryInformationResponse[" + super.toString() + ",fileAttributes=0x" + Hexdump.toHexString(this.fileAttributes, 4)
                    + ",lastWriteTime=" + new Date(this.lastWriteTime) + ",fileSize=" + this.fileSize + "]");
        }
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 3.6K bytes
    - Click Count (0)
Back to Top