3.0.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
LGPL-3.0 - GNU Lesser General Public License v3.0 onlyTyped multipart form extractor for actix-web.
This functionality has been now been merged into the official
actix-multipart
crate (as of version0.6.0
).Please use the
actix-multipart
module instead, read the documentation here.This repository will no longer be maintained.
use actix_web::Responder;
use actix_easy_multipart::tempfile::Tempfile;
use actix_easy_multipart::text::Text;
use actix_easy_multipart::MultipartForm;
#[derive(MultipartForm)]
struct Upload {
description: Option<Text<String>>,
timestamp: Text<i64>,
#[multipart(rename="image_set[]")]
image_set: Vec<Tempfile>,
}
async fn route(form: MultipartForm<Upload>) -> impl Responder {
format!("Received 5 images: {}", form.image_set.len())
}
Option
.Vec<T>
.Text<T>
.Json<T>
.Tempfile
.FieldReader
trait.actix-easy-multipart | actix-web | tokio |
---|---|---|
0.x | 2.x | 0.2 |
1.x | 3.x | 0.2 |
2.x | 4.x | 1 |
3.x | 4.x | 1 |