Closed d--j closed 4 years ago
Well this sucks :) Good spotting the missing "f" in "tiff". Making the mimetypes configurable would also certainly help so people can disable a filetype if needed. I am out of time lately so I am not sure I can fix this right away. A PR is welcome.
This line
https://github.com/ariselseng/camerarawpreviews/blob/0a8268aaddd6445be4f833638b42e834156af30a/lib/AppInfo/Application.php#L64
registers a wrong MIME type for .tif files (no .tiff files, tho) so that your
RawPreview
class can handle TIFF previews. CurrentlyRawPreview
can only handle TIFFs with embedded previews.OC\Preview\TIFF
can also preview TIFF files that do not include a preview (like these test-tiffs.zip )exiftool returns this for the example file:
Could you maybe add a check that sees if the Nextcloud instance has
OC\Preview\TIFF
configured for a preview provider and if that's the case skip the MIME type registration oftif
toimage/x-dcraw
? Alternatively one could probably teach this app to fall back to extracting a preview form theSourceFile
TIFF when theimagick
PHP extension is present and exiftool does not return aPreviewTIFF
key.see nextcloud/server#12876