How to trigger Nextcloud to index files, generate thumbnails for newly created files by Syncthing (External storage)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27
Operating system and version (eg, Ubuntu 20.04): Fedora, Nextcloud via Docker
Apache or nginx version (eg, Apache 2.4.25): Nextcloud via Docker
PHP version (eg, 7.4): Nextcloud via Docker

The issue you are facing:
If I setup Nextcloud, with only “external storage”, which will be local storage really, but the same folder that Syncthing is syncing to/from, how do I ensure filenames/paths will be indexed, metadata read and all images (if possible videos too) thumbnails are being generated after the files have been locally created?
To ensure smooth web browsing experience, I want to generate-in-advance as much as possible.

I already understand Syncthing and Nextcloud need to use the same user etc. That is no problem for me.
This is really about triggering Nextcloud, for example, by built in mechanism monitoring folders (inotify) or more efficiently, by leveraging the Syncthing API:

Syncthing Folder Event Daemon

You will need to script occ to scan for changes. See examples in other threads like Automatically do a files:scan on that specific file when a new file is added - #13 by ChineseAegis