Expand description
Shared multipart-body parsing helpers.
Provides parse_multipart — a generic drain over an axum::extract::Multipart
stream that classifies each part as either an in-memory form field (≤ 4 KiB)
or a spooled file written to a per-request temp directory.
Per-router validation (filename traversal checks, URL-body detection, extension checks, …) belongs in each router’s own parse adapter, not here.
Structs§
- Multipart
Opts - Options that control multipart parsing.
- Parsed
Form - Result of a
parse_multipartcall. - Spooled
File - A single spooled-to-disk file part.
- Upload
Guard - RAII wrapper that removes the per-request spool directory on
Drop.
Functions§
- check_
filename_ traversal - Check a filename for path traversal sequences.
- parse_
multipart - Drain an axum
Multipartstream into aParsedForm. - sanitize_
path_ component - Replace any filesystem-unsafe characters with
_and truncate to 200 chars.