Serve video gifs when requested

This commit is contained in:
Cameron
2025-07-02 15:48:49 -04:00
parent 3fbdba2b9c
commit e5afdd909b
7 changed files with 187 additions and 41 deletions

View File

@@ -134,10 +134,20 @@ pub enum PhotoSize {
Thumb,
}
#[derive(Deserialize)]
#[derive(Debug, Deserialize)]
pub struct ThumbnailRequest {
pub path: String,
pub size: Option<PhotoSize>,
pub(crate) path: String,
pub(crate)size: Option<PhotoSize>,
#[serde(default)]
pub(crate)format: Option<ThumbnailFormat>,
}
#[derive(Debug, Deserialize, PartialEq)]
pub enum ThumbnailFormat {
#[serde(rename = "gif")]
Gif,
#[serde(rename = "image")]
Image,
}
#[derive(Deserialize)]