From f112e8bfb2fc8ef4bdbc5c331fa724098fce83d3 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 18 Aug 2026 14:42:54 +0200 Subject: [PATCH] feat(thumbnails): register Nikon NRW and Sony SRF raw previews Both are TIFF-based camera raw formats handled by the same generic walker; NRW detection needs the reva mimetype mapping in opencloud-eu/reva#773, SRF is already mapped. No sample files on hand for these two, added by format structure alongside their verified siblings. --- services/thumbnails/README.md | 2 +- services/thumbnails/pkg/preprocessor/preprocessor.go | 2 ++ services/thumbnails/pkg/thumbnail/mimetypes.go | 2 ++ services/thumbnails/pkg/thumbnail/mimetypes_vips.go | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/services/thumbnails/README.md b/services/thumbnails/README.md index 789d802c9a..25c9a03023 100644 --- a/services/thumbnails/README.md +++ b/services/thumbnails/README.md @@ -30,7 +30,7 @@ Thumbnails can be generated from the following source file types: - tiff - bmp - txt -- camera raw files: nef, cr2, pef, arw, sr2, dng +- camera raw files: nef, nrw, cr2, pef, arw, sr2, srf, dng For camera raw files the thumbnail is generated from the JPEG preview the camera embedded in the file, the raw sensor data itself is not developed. Raw files without an embedded preview cannot be thumbnailed. diff --git a/services/thumbnails/pkg/preprocessor/preprocessor.go b/services/thumbnails/pkg/preprocessor/preprocessor.go index 056b899dfb..10064f97f7 100644 --- a/services/thumbnails/pkg/preprocessor/preprocessor.go +++ b/services/thumbnails/pkg/preprocessor/preprocessor.go @@ -345,10 +345,12 @@ func ForType(mimeType string, opts map[string]any) FileConverter { case "audio/ogg": return AudioDecoder{} case "image/x-nikon-nef", + "image/x-nikon-nrw", "image/x-canon-cr2", "image/x-pentax-pef", "image/x-sony-arw", "image/x-sony-sr2", + "image/x-sony-srf", "image/x-adobe-dng": return RawTiffDecoder{} default: diff --git a/services/thumbnails/pkg/thumbnail/mimetypes.go b/services/thumbnails/pkg/thumbnail/mimetypes.go index 14d5a265cf..d380ed72d0 100644 --- a/services/thumbnails/pkg/thumbnail/mimetypes.go +++ b/services/thumbnails/pkg/thumbnail/mimetypes.go @@ -13,10 +13,12 @@ var ( "image/x-ms-bmp": {}, "image/tiff": {}, "image/x-nikon-nef": {}, + "image/x-nikon-nrw": {}, "image/x-canon-cr2": {}, "image/x-pentax-pef": {}, "image/x-sony-arw": {}, "image/x-sony-sr2": {}, + "image/x-sony-srf": {}, "image/x-adobe-dng": {}, "text/plain": {}, "audio/flac": {}, diff --git a/services/thumbnails/pkg/thumbnail/mimetypes_vips.go b/services/thumbnails/pkg/thumbnail/mimetypes_vips.go index 66a22b043f..b327f8b41e 100644 --- a/services/thumbnails/pkg/thumbnail/mimetypes_vips.go +++ b/services/thumbnails/pkg/thumbnail/mimetypes_vips.go @@ -13,10 +13,12 @@ var ( "image/x-ms-bmp": {}, "image/tiff": {}, "image/x-nikon-nef": {}, + "image/x-nikon-nrw": {}, "image/x-canon-cr2": {}, "image/x-pentax-pef": {}, "image/x-sony-arw": {}, "image/x-sony-sr2": {}, + "image/x-sony-srf": {}, "image/x-adobe-dng": {}, "text/plain": {}, "audio/flac": {},