- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for file_size (0.06 sec)
-
tests/test_tutorial/test_request_files/test_tutorial001.py
client = TestClient(app) 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): default_pydantic_max_size = 2**16 path = tmp_path / "test.txt" path.write_bytes(b"x" * (default_pydantic_max_size + 1)) client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.7K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_an.py
client = TestClient(app) 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): default_pydantic_max_size = 2**16 path = tmp_path / "test.txt" path.write_bytes(b"x" * (default_pydantic_max_size + 1)) client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_an_py39.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} @needs_py39 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.7K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py
data={"token": "foo"}, files={"file": filea, "fileb": ("testb.txt", fileb, "text/plain")}, ) 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")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.8K bytes - Viewed (0) -
fastapi/datastructures.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): return {"filename": file.filename} ``` """ file: Annotated[ BinaryIO,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
data={"token": "foo"}, files={"file": filea, "fileb": ("testb.txt", fileb, "text/plain")}, ) 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")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py
data={"token": "foo"}, files={"file": filea, "fileb": ("testb.txt", fileb, "text/plain")}, ) assert response.status_code == 200, response.text assert response.json() == { "file_size": 14, "token": "foo", "fileb_content_type": "text/plain", } @needs_py39 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.9K bytes - Viewed (0) -
cmd/bucket-stats_gen.go
case "PendingSize": z.PendingSize, err = dc.ReadInt64() if err != nil { err = msgp.WrapError(err, "PendingSize") return } case "FailedSize": z.FailedSize, err = dc.ReadInt64() if err != nil { err = msgp.WrapError(err, "FailedSize") return } case "PendingCount": z.PendingCount, err = dc.ReadInt64() if err != nil { err = msgp.WrapError(err, "PendingCount")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 06:00:45 UTC 2024 - 57.5K bytes - Viewed (0) -
cmd/site-replication-utils.go
ResyncStatus: rs.Status.String(), ResyncID: rst.resyncID, DeplID: rs.DeplID, ReplicatedSize: rs.ReplicatedSize, ReplicatedCount: rs.ReplicatedCount, FailedSize: rs.FailedSize, FailedCount: rs.FailedCount, Bucket: rs.Bucket, Object: rs.Object, NumBuckets: int64(rs.TotBuckets), } for b, st := range rs.BucketStatuses {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 8.9K bytes - Viewed (0) -
cmd/speedtest.go
return ch } func driveSpeedTest(ctx context.Context, opts madmin.DriveSpeedTestOpts) madmin.DriveSpeedTestResult { perf := &dperf.DrivePerf{ Serial: opts.Serial, BlockSize: opts.BlockSize, FileSize: opts.FileSize, } localPaths := globalEndpoints.LocalDisksPaths() var ignoredPaths []string paths := func() (tmpPaths []string) { for _, lp := range localPaths {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon May 06 09:45:10 UTC 2024 - 9.2K bytes - Viewed (0)