Skip to content

file upload and multipart issue #2739

Answered by seanmonstar
moaz-mokhtar asked this question in Q&A
Discussion options

You must be logged in to vote

Your service function needs to return a Response, not a (). Switch to a signature like this:

async fn service(req: Request<Body>) -> Result<Response<Body>, Infallible> {
    // ...
}

For multipart, there are a lot of options. I can't say which one you definitely should use, but multer seems like a comprehensive library.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@moaz-mokhtar
Comment options

Answer selected by seanmonstar
Comment options

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #2738 on January 18, 2022 19:56.