feat(thumbnails): allow thumbnails on ggp files

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2024-11-06 19:32:08 +01:00
parent 1fc3de6714
commit 02196da2e0
4 changed files with 20 additions and 10 deletions
@@ -14,6 +14,7 @@ const (
typeJpeg = "jpeg"
typeGif = "gif"
typeGgs = "ggs"
typeGgp = "ggp"
)
// Encoder encodes the thumbnail to a specific format.
@@ -52,7 +53,7 @@ func (e GifEncoder) MimeType() string {
// or nil if the type is not supported.
func EncoderForType(fileType string) (Encoder, error) {
switch strings.ToLower(fileType) {
case typePng, typeGgs:
case typePng, typeGgs, typeGgp:
return PngEncoder{}, nil
case typeJpg, typeJpeg:
return JpegEncoder{}, nil
@@ -71,6 +72,8 @@ func GetExtForMime(fileType string) string {
return ext
case "application/vnd.geogebra.slides":
return typeGgs
case "application/vnd.geogebra.pinboard":
return typeGgp
default:
return ""
}