Skip to content

I am trying to add a handler which handles upload of csv file via multipart, but it doesnt work, please help #1149

Answered by juhaku
kirillsalykin asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to define the schema according to OpenAPI 3.0, you can override the type with value_type and then define format which should correlate to the OpenAPI formats.

#[derive(ToSchema)]
struct EmailUpload {
    #[schema(content_media_type = "application/octet-stream", value_type = String, format = Binary)]
    email: Vec<u8>,
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@kirillsalykin
Comment options

@juhaku
Comment options

@kirillsalykin
Comment options

@juhaku
Comment options

Answer selected by kirillsalykin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants