Expand description
Safe temporary multipart uploads and explicit storage.
Applications define typed forms with axum_typed_multipart::TryFromMultipart.
Use #[try_from_multipart(strict)] to reject unknown and duplicate fields,
#[form_data(limit = "...")] on every file and text field, and
request_body_limit on the route. File fields should use
FieldData<NamedTempFile> so request bodies are streamed to temporary files.
Authorization and application validation should run before store_upload.
Structs§
- Stored
Upload - Metadata returned after an accepted temporary upload is stored.
- Temporary
Upload File - Re-export of the streaming temporary-file type used in typed multipart forms. A named temporary file.
Functions§
- request_
body_ limit - Applies an Axum total request-body limit while multipart fields are read.
- store_
upload - Stores a validated temporary upload under an opaque generated name.