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;
13mod guard;
14#[cfg(feature = "local")]
15pub mod local;
16#[cfg(feature = "opendal")]
17pub mod opendal;
18mod types;
19pub(crate) mod utils;
20
21pub use factory::storage;
22pub use types::{FileStorage, FileStorageDyn, FileStorageSend, StoredFile};
23#[cfg(feature = "opendal")]
24pub(crate) use utils::validate_logical_path;
25pub(crate) use utils::{ensure_within, generate_filename};