Actix Multipart not working #2710
Answered
by
robjtede
krishnaTORQUE
asked this question in
Q&A
-
Actix Multipart not working. Code use actix_multipart::Multipart;
use actix_web::{web, App, HttpRequest, HttpResponse, HttpServer};
use std::{io, str};
async fn upload(mut payload: Multipart) -> HttpResponse {
while let Some(mut item) = payload.next().await {
while let Some(chunk) = item.unwrap().next().await {
println!("-- CHUNK: \n{:?}", str::from_utf8(&chunk.unwrap()));
}
}
HttpResponse::Ok().body("Done")
} Error |
Beta Was this translation helpful? Give feedback.
Answered by
robjtede
Mar 23, 2022
Replies: 1 comment
-
You've deleted the StreamExt import from that example. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
robjtede
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You've deleted the StreamExt import from that example.