server icon indicating copy to clipboard operation
server copied to clipboard

RFE: Nextcloud should support a thumbnailing/preview API

Open rubrik opened this issue 8 years ago • 7 comments

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.

rubrik avatar Jan 14 '18 18:01 rubrik

@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.

MorrisJobke avatar Jan 15 '18 10:01 MorrisJobke

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:

  1. 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.
  2. Some dedicated process is watching the queue and fetches the fileid and token.
  3. It requests the full file via some API with the fileid and the token
  4. It generates a ton of previews
  5. It uploads all the previews via the API with the fileid and the token

However it complicates things. And adds another code path.

rullzer avatar Jan 15 '18 14:01 rullzer

What's the difference to https://github.com/rullzer/previewgenerator?

wiswedel avatar May 27 '19 17:05 wiswedel

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.

MorrisJobke avatar May 27 '19 18:05 MorrisJobke

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.

szaimen avatar May 21 '21 09:05 szaimen

#24166

joshtrichards avatar Jan 31 '25 17:01 joshtrichards

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...

sylvaticus avatar Aug 25 '26 15:08 sylvaticus