mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
add admin command to delete all remote media files
This commit is contained in:
parent
d7087c66bb
commit
9d14c5d461
4 changed files with 98 additions and 2 deletions
|
|
@ -141,6 +141,15 @@ impl Service {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// List all media stored in the database.
|
||||
///
|
||||
/// Each MXC is list once. Thumbnails are not included separately from the
|
||||
/// original media.
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub(crate) fn iter_all(&self) -> impl Iterator<Item = Result<OwnedMxcUri>> {
|
||||
self.db.all_file_metadata().map(|media| media.map(|(mxc, ..)| mxc))
|
||||
}
|
||||
|
||||
/// Returns width, height of the thumbnail and whether it should be cropped.
|
||||
/// Returns None when the server should send the original file.
|
||||
fn thumbnail_properties(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue