Can export family data

This commit is contained in:
2023-08-17 17:37:44 +02:00
parent 680c2d2624
commit 3b5efb46cd
7 changed files with 224 additions and 6 deletions

View File

@ -168,6 +168,13 @@ impl Photo {
pub fn thumbnail_path(&self) -> String {
format!("thumbnail/{}", self.file_id)
}
pub fn mime_extension(&self) -> Option<&str> {
mime_guess::get_mime_extensions_str(&self.mime_type)
.map(|e| e.first())
.unwrap_or_default()
.copied()
}
}
#[derive(Insertable)]