modo_upload/storage/mod.rs
1//! Pluggable storage backends for persisted file uploads.
2//!
3//! Use [`storage()`] to construct the appropriate backend from
4//! [`UploadConfig`](crate::UploadConfig), or instantiate a concrete backend
5//! directly:
6//!
7//! - [`local::LocalStorage`] — writes files to the local filesystem.
8//! Requires the `local` feature (enabled by default).
9//! - `opendal::OpendalStorage` — delegates to any Apache OpenDAL operator,
10//! including S3-compatible services. Requires the `opendal` feature.
11
12mod factory;
13#[cfg(feature = "local")]
14pub mod local;
15#[cfg(feature = "opendal")]
16pub mod opendal;
17mod types;
18pub(crate) mod utils;
19
20pub use factory::storage;
21pub use types::{FileStorage, StoredFile};
22#[cfg(feature = "opendal")]
23pub(crate) use utils::validate_logical_path;
24pub(crate) use utils::{ensure_within, generate_filename};