salvo-file-handling

Installation
SKILL.md

Salvo File Handling

Setup

[dependencies]
salvo = { version = "0.89.3", features = ["size-limiter"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread", "fs"] }

req.file()/req.files() return Option<&FilePart> / Option<&Vec<FilePart>>. Salvo writes multipart parts to a temp dir, so file.path() points at an on-disk file — copy or rename it to the final location; don't rely on it sticking around after the handler returns.

Single File Upload

use std::path::Path;
use salvo::prelude::*;
Related skills
Installs
15
GitHub Stars
18
First Seen
Feb 10, 2026