STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
backend.routers.layerx.UploadSizeGuard Class Reference

Public Member Functions

None __init__ (self, Any app)
None __call__ (self, Dict[str, Any] scope, Any receive, Any send)

Public Attributes

 app = app

Static Public Attributes

str PATH = "/api/layerx/drawings"

Detailed Description

ASGI middleware: refuse a drawing upload larger than MAX_UPLOAD_BYTES before its body is read.
FastAPI parses (and Starlette spools to disk) a multipart file before the route runs, so the
route's own cap came after the whole body had arrived. The multipart envelope is allowed 64 kB.

Definition at line 86 of file layerx.py.

Constructor & Destructor Documentation

◆ __init__()

None backend.routers.layerx.UploadSizeGuard.__init__ ( self,
Any app )

Definition at line 93 of file layerx.py.

Member Function Documentation

◆ __call__()

None backend.routers.layerx.UploadSizeGuard.__call__ ( self,
Dict[str, Any] scope,
Any receive,
Any send )

Definition at line 96 of file layerx.py.

References app, stardesign.userdata.UserData.app, PATH, and send().

Member Data Documentation

◆ app

backend.routers.layerx.UploadSizeGuard.app = app

Definition at line 94 of file layerx.py.

Referenced by __call__().

◆ PATH

str backend.routers.layerx.UploadSizeGuard.PATH = "/api/layerx/drawings"
static

Definition at line 91 of file layerx.py.

Referenced by __call__().


The documentation for this class was generated from the following file: