- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 90 for filesize (0.07 sec)
-
tests/test_request_params/test_file/test_optional_list.py
async def read_optional_list_bytes(p: Annotated[Optional[list[bytes]], File()] = None): return {"file_size": [len(file) for file in p] if p else None} @app.post("/optional-list-uploadfile") async def read_optional_list_uploadfile( p: Annotated[Optional[list[UploadFile]], File()] = None, ): return {"file_size": [file.size for file in p] if p else None} @pytest.mark.parametrize( "path", [
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.4K bytes - Viewed (0) -
tests/test_request_params/test_file/test_optional.py
async def read_optional_bytes(p: Annotated[Optional[bytes], File()] = None): return {"file_size": len(p) if p else None} @app.post("/optional-uploadfile", operation_id="optional_uploadfile") async def read_optional_uploadfile(p: Annotated[Optional[UploadFile], File()] = None): return {"file_size": p.size if p else None} @pytest.mark.parametrize( "path", [ "/optional-bytes",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.7K bytes - Viewed (0) -
tests/test_request_params/test_file/test_list.py
@app.post("/list-bytes", operation_id="list_bytes") async def read_list_bytes(p: Annotated[list[bytes], File()]): return {"file_size": [len(file) for file in p]} @app.post("/list-uploadfile", operation_id="list_uploadfile") async def read_list_uploadfile(p: Annotated[list[UploadFile], File()]): return {"file_size": [file.size for file in p]} @pytest.mark.parametrize( "path", [ "/list-bytes",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:31:34 UTC 2025 - 11.2K bytes - Viewed (0) -
tests/test_request_params/test_file/test_required.py
@app.post("/required-bytes", operation_id="required_bytes") async def read_required_bytes(p: Annotated[bytes, File()]): return {"file_size": len(p)} @app.post("/required-uploadfile", operation_id="required_uploadfile") async def read_required_uploadfile(p: Annotated[UploadFile, File()]): return {"file_size": p.size} @pytest.mark.parametrize( "path", [ "/required-bytes", "/required-uploadfile",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.8K bytes - Viewed (0) -
cmd/batch-handlers_gen.go
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 20.4K bytes - Viewed (0) -
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):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 322 bytes - Viewed (0) -
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))
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.1K bytes - Viewed (0) -
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):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 282 bytes - Viewed (0) -
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"), ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 371 bytes - Viewed (0) -
cmd/erasure-server-pool-rebalance_gen.go
} } o = bts return } // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message func (z rebalanceInfo) Msgsize() (s int) { s = 1 + 8 + msgp.TimeSize + 7 + msgp.TimeSize + 7 + msgp.Uint8Size return } // DecodeMsg implements msgp.Decodable func (z *rebalanceMeta) DecodeMsg(dc *msgp.Reader) (err error) { var field []byte _ = field var zb0001 uint32
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 26.8K bytes - Viewed (0)