#multipart-form #axum #web #multipart

aide-axum-typed-multipart

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

1 unstable release

0.13.0 Mar 6, 2024

#25 in #multipart-form

Download history 117/week @ 2024-07-20 186/week @ 2024-07-27 26/week @ 2024-08-03 15/week @ 2024-08-10 268/week @ 2024-08-17 19/week @ 2024-08-24 151/week @ 2024-08-31 43/week @ 2024-09-07 74/week @ 2024-09-14 73/week @ 2024-09-21 25/week @ 2024-09-28 21/week @ 2024-10-05 22/week @ 2024-10-12 11/week @ 2024-10-19 3/week @ 2024-10-26 35/week @ 2024-11-02

78 downloads per month

MIT/Apache

3.5MB
7K SLoC

Rust 5K SLoC // 0.0% comments JavaScript 1.5K SLoC // 0.0% comments

aide-axum-typed-multipart

Wrapper around axum_typed_multipart to generate documentation for multipart requests.

Example

use aide_axum_typed_multipart::{FieldData, TypedMultipart};
use axum::{body::Bytes, http::StatusCode};
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;
}

Dependencies

~13–24MB
~424K SLoC