Skip to content

How to use FromRequest with State #1600

Closed Answered by davidpdrsn
tsxiaofang asked this question in Q&A
Discussion options

You must be logged in to vote

Multipart needs to be the last argument:

async fn handler(State(s): State<Arc<...>>, parts: Multipart) -> impl IntoResponse {}

Documented here

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tsxiaofang
Comment options

@davidpdrsn
Comment options

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