#axum #multipart #web #aide #typed-multipart

aide-axum-typed-multipart-2

Type safe multipart/form-data handling for axum and aide

2 unstable releases

Uses new Rust 2024

0.15.0 Mar 24, 2025
0.14.0 Feb 6, 2025

#1 in #aide

Download history 60/week @ 2025-01-31 64/week @ 2025-02-07 8/week @ 2025-02-14 28/week @ 2025-02-21 49/week @ 2025-02-28 13/week @ 2025-03-07 3/week @ 2025-03-14 110/week @ 2025-03-21 25/week @ 2025-03-28 3/week @ 2025-04-04 2/week @ 2025-04-11

140 downloads per month

MIT/Apache

18KB
89 lines

aide-axum-typed-multipart-2

Wrapper around axum_typed_multipart to generate documentation for multipart requests.

Example

use aide_axum_typed_multipart::{FieldData, TypedMultipart};
use axum::{http::StatusCode};
use bytes::Bytes;
use axum_typed_multipart::TryFromMultipart;
use schemars::JsonSchema;

#[derive(TryFromMultipart, JsonSchema)]
struct MyMultipart {
    title: String,
    description: String,
    #[form_data(limit = "unlimited")]
    image: FieldData<Bytes>,
}

async fn post_hello_world(_: TypedMultipart<MyMultipart>) -> StatusCode {
    // do something
    return StatusCode::OK;
}

License

All code in this repository is dual licensed under MIT and Apache-2.0.

Dependencies

~19–30MB
~455K SLoC