Easy to use Multipart Forms for actix-web.
File uploads are written to disk as temporary files similar to the way the $_FILES variable works in PHP.
use actix_web::Responder;
use actix_easy_multipart::{MultipartFile, FromMultipart};
use actix_easy_multipart::extractor::MultipartForm;
#[derive(FromMultipart)]
struct Upload {
description: String,
image: MultipartFile,
}
async fn route(form: MultipartForm<Upload>) -> impl Responder {
format!("Received image of size: {}", form.image.size)
}