diff --git a/changelog/unreleased/thumbnails-tiff-bmp.md b/changelog/unreleased/thumbnails-tiff-bmp.md new file mode 100644 index 000000000..309dc093c --- /dev/null +++ b/changelog/unreleased/thumbnails-tiff-bmp.md @@ -0,0 +1,5 @@ +Enhancement: Add thumbnails support for tiff and bmp files + +Support generating thumbnails for tiff and bmp files in the thumbnails service. + +https://github.com/owncloud/ocis/pull/4634 diff --git a/services/thumbnails/pkg/thumbnail/thumbnail.go b/services/thumbnails/pkg/thumbnail/thumbnail.go index c1efbe22e..31325ff3d 100644 --- a/services/thumbnails/pkg/thumbnail/thumbnail.go +++ b/services/thumbnails/pkg/thumbnail/thumbnail.go @@ -13,11 +13,14 @@ import ( var ( // SupportedMimeTypes contains a all mimetypes which are supported by the thumbnailer. SupportedMimeTypes = map[string]struct{}{ - "image/png": {}, - "image/jpg": {}, - "image/jpeg": {}, - "image/gif": {}, - "text/plain": {}, + "image/png": {}, + "image/jpg": {}, + "image/jpeg": {}, + "image/gif": {}, + "image/bmp": {}, + "image/x-ms-bmp": {}, + "image/tiff": {}, + "text/plain": {}, } ) diff --git a/services/web/pkg/config/defaults/defaultconfig.go b/services/web/pkg/config/defaults/defaultconfig.go index 0e913c4c9..cf08feeb1 100644 --- a/services/web/pkg/config/defaults/defaultconfig.go +++ b/services/web/pkg/config/defaults/defaultconfig.go @@ -47,9 +47,22 @@ func DefaultConfig() *config.Config { ResponseType: "code", Scope: "openid profile email", }, - Apps: []string{"files", "search", "preview", "text-editor", "pdf-viewer", "external", "user-management"}, + Apps: []string{"files", "search", "text-editor", "pdf-viewer", "external", "user-management"}, + ExternalApps: []config.ExternalApp{ + { + ID: "preview", + Path: "web-app-preview", + Config: map[string]interface{}{ + "mimeTypes": []string{ + "image/tiff", + "image/bmp", + "image/x-ms-bmp", + }, + }, + }, + }, Options: map[string]interface{}{ - "previewFileMimeTypes": []string{"image/gif", "image/png", "image/jpeg", "text/plain"}, + "previewFileMimeTypes": []string{"image/gif", "image/png", "image/jpeg", "text/plain", "image/tiff", "image/bmp", "image/x-ms-bmp"}, }, }, },