Expand description
Multipart form data parser.
Provides parsing of multipart/form-data request bodies, commonly used for file uploads.
The parser enforces per-file and total size limits.
Structs§
- Multipart
Config - Configuration for multipart parsing.
- Multipart
Form - Parsed multipart form data.
- Multipart
Parser - Multipart parser (boundary-based).
- Multipart
Stream State - Incremental parser state for streamed multipart bodies.
- Part
- A parsed multipart form part.
- Upload
File - An uploaded file with metadata and FastAPI-style async file operations.
Enums§
- Multipart
Error - Errors that can occur during multipart parsing.
Constants§
- DEFAULT_
MAX_ FIELDS - Default maximum number of fields.
- DEFAULT_
MAX_ FILE_ SIZE - Default maximum file size (10MB).
- DEFAULT_
MAX_ TOTAL_ SIZE - Default maximum total upload size (50MB).
- DEFAULT_
SPOOL_ THRESHOLD - Default threshold for spooling uploads to a temporary file (1MB).
Functions§
- parse_
boundary - Parse boundary from Content-Type header.