Function actix_validated_forms::multipart::load_parts
source · [−]pub async fn load_parts(
payload: Multipart,
config: MultipartLoadConfig
) -> Result<Multiparts, MultipartError>
Expand description
Use to load a multipart form from an Actix Multipart request
This is an asynchronous operation, blocking IO such as writing an uploaded file
to disk will be done on a background thread pool (using actix_web::web::block
)
Example
async fn route(payload: actix_multipart::Multipart) -> Result<HttpResponse, Error> {
let mut form = load_parts(payload, MultipartLoadConfig::default()).await?;