Hi, let’s say I have another app that generates files in the nextcloud directory “user/files/folder1/”, how can I get nextcloud to automate adding the new file into NC without having to type out the OCC command manually each time?
I currently normally run this with the occweb app files:scan --path=user/files/folder1
Would usually run this instead of files:scan --all as it would take too long. Any alternate ways to add the file without scanning the whole folder would be even better!
I’m running NC20 on docker, using the latest image.
I note that there’s the workflow scripts app, and I also use rcdailey/nextcloud-cronjob. Any simple way to get the desired effect working?
Perhaps another way. I use an additional file uploader (https://tinyfilemanager.github.io/) to upload to an external dir on the same server but outside Nextcloud. In Nextcloud i have mounted the external directory (not in nextcloud/data) with “external storage” (type local). If i upload files i found them after reload the folder in Nextcloud.
Install the workflow_scripts app, create a batch script which is being executed on a new file creation event and force an “occ files:scan ...” command. Other users have already used it for various jobs, see e.g.: