richdocuments
richdocuments copied to clipboard
Watermark BeforeFetchPreviewListener returns 404 for png and jpg in Files
Describe the bug When Watermark is enabled in Richdocuments, then I cannot get a preview anymore for png and jpg files, but get a 404 error.
To Reproduce Steps to reproduce the behavior:
- Enable Watermark in Nextcloud Office settings in Administration
- In Files, click on a PNG picture, to see the preview.
- You get a 404 error
Expected behavior I would only expect this to affect documents managed by Richdocuments, eg. Text, Spreadsheet, etc, but not png and jpg files. It says on the admin screen: "The settings only apply to compatible office files that are opened in Nextcloud Office"
The preview fails with 404, because of https://github.com/nextcloud/richdocuments/blob/main/lib/Listener/BeforeFetchPreviewListener.php#L80 I suggest to only throw a NotFoundException if the document is an office document.