RFE: Nextcloud should support a thumbnailing/preview API
If Nextcloud could support a thumbnailing API, the thumbnail generation could be handed out to a small dedicated thumbnailer process. This dedicated process could scale out thumbnail generation how it wants, leading to accelerated generation of thumbnails. Because the process would be smaller and dedicated, it has the potential to be much more secure: it might only have read access to the content, and it could be locked down hard with SELinux.
@LukasReschke and I already thought about this.
@rullzer What is your opinion here?
Not to confuse with #3923, because this is an endpoint for thumbnail generation.
My opinion is that it would be nice to have. But it is not so trivial and adding it would lead to two preview code paths as we also want people to still have previews if then can't run a dedicated process.
But basically from my POV it would look like:
- File is created/updated this is noticed and we push this to some queue (much like the preview generator app does now) together with a token.
- Some dedicated process is watching the queue and fetches the fileid and token.
- It requests the full file via some API with the fileid and the token
- It generates a ton of previews
- It uploads all the previews via the API with the fileid and the token
However it complicates things. And adds another code path.
What's the difference to https://github.com/rullzer/previewgenerator?
What's the difference to https://github.com/rullzer/previewgenerator?
Some API endpoint that exposes files that should get a preview and then a service can fetch them from there, create the preview and upload the preview.
Purpose: complete isolation of the preview generation to avoid it as an attack vector. For some files you don't want to render a preview inside the Webserver job. Thus having this in an isolated environment is key.
I am going to close this since there doesn't seem to be a lot of interest (no upvotes) and no respond since around 2 years. Please reopen if you still want to implement this.
#24166
Just to say this is actually needed as some very used nextcloud providers (e.g. Hetzner) doesn't expose ffmpeg, i.e. no video thumbnails, and not having this API means we can't have a cheap VPS on the side to do the job...