previewgenerator
previewgenerator copied to clipboard
Use `isAvailable()` instead of `isMimeSupported()`?
First I have to note that I didn't work with the Nextcloud code or the code of any of its apps. Maybe I just don't unterstand things right.
The drawio app always returns the supported mimetypes and returns false in the isAvailable() function if previews are disabled in the settings. Therefore it might be better to use that function instead of isMimeSupported() to check whether a preview should be generated or not (assuming the way the drawio app is implemented is correct)?
Code references:
- drawio app: https://github.com/jgraph/drawio-nextcloud/blob/main/lib/Preview/DrawioPreview.php
- previewgenerator: Generate.php and PreGenerate.php
I had a look at the code and don't quite understand the use case yet. Could you please explain what exactly is broken or doesn't work by using isMimeSupported()?