mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-14 07:51:01 +00:00
Add support for SVG medias
This commit is contained in:
parent
772bb350ac
commit
15f4a2079f
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ impl Media {
|
|||
pub fn to_json(&self, conn: &PgConnection) -> serde_json::Value {
|
||||
let mut json = serde_json::to_value(self).unwrap();
|
||||
let (preview, html) = match self.file_path.rsplitn(2, '.').next().unwrap() {
|
||||
"png" | "jpg" | "jpeg" | "gif" => (
|
||||
"png" | "jpg" | "jpeg" | "gif" | "svg" => (
|
||||
format!("<img src=\"{}\" alt=\"{}\" title=\"{}\" class=\"preview\">", self.url(conn), self.alt_text, self.alt_text),
|
||||
format!("<img src=\"{}\" alt=\"{}\" title=\"{}\">", self.url(conn), self.alt_text, self.alt_text)
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue