Skip to main content

tuwunel_admin/media/
get_file_info.rs

1use ruma::{Mxc, OwnedMxcUri};
2use tuwunel_core::Result;
3
4use crate::admin_command;
5
6#[admin_command]
7pub(super) async fn get_file_info(&self, mxc: OwnedMxcUri) -> Result {
8	let mxc: Mxc<'_> = mxc.as_str().try_into()?;
9	let metadata = self.services.media.get_metadata(&mxc).await;
10
11	write!(self, "```\n{metadata:#?}\n```").await
12}