feat: add preview for webp images, videos and pdf files

This commit is contained in:
Louis Dalibard 2024-06-11 14:30:50 +02:00
parent 9d6b38057a
commit 7a619b7526

View File

@ -18,7 +18,7 @@ import (
ffmpeg "github.com/u2takey/ffmpeg-go" ffmpeg "github.com/u2takey/ffmpeg-go"
) )
var SupportedFileTypes = []string{".png", ".PNG", ".jpg", ".JPG", ".jpeg", ".JPEG", ".webp", ".WEBP", ".pdf", ".PDF", ".mp4", ".MP4", ".webm", ".WEBM", ".mkv", ".MKV"} var SupportedFileTypes = []string{".png", ".PNG", ".jpg", ".JPG", ".jpeg", ".JPEG", ".webp", ".webP", ".WEBP", ".pdf", ".PDF", ".mp4", ".MP4", ".webm", ".WEBM", ".mkv", ".MKV"}
var FileTypesMap = map[string]imaging.Format{ var FileTypesMap = map[string]imaging.Format{
".png": imaging.PNG, ".png": imaging.PNG,
".PNG": imaging.PNG, ".PNG": imaging.PNG,
@ -40,6 +40,7 @@ var FileTypesMap = map[string]imaging.Format{
var FFMPEGFormats = []string{ var FFMPEGFormats = []string{
".webp", ".webp",
".webP",
".WEBP", ".WEBP",
".mp4", ".mp4",
".MP4", ".MP4",