pub trait Uploader:
Send
+ Sync
+ 'static {
// Required method
fn store(
&self,
filename: &str,
bytes: &[u8],
) -> impl Future<Output = Result<String, String>> + Send;
// Provided method
fn holds(&self, path: &str) -> impl Future<Output = bool> + Send { ... }
}Expand description
Stores one uploaded file and names the value a record stores; installed once
per panel with Panel::uploads.
filename arrives sanitized to a non-empty basename without directories or
control characters; bytes are bounded by the 10 MiB form-body cap. The
framework stores the returned path verbatim.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".