pub trait FileStorage: Send + Sync {
// Required methods
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original_filename: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, AdminError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AdminError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn url(&self, path: &str) -> String;
}Required Methods§
Sourcefn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original_filename: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, AdminError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original_filename: &'life1 str,
data: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, AdminError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store data (raw bytes) and return the public URL/path to the stored file.
original_filename is used only to preserve the file extension.