nextcloud / files_automatedtagging

:bookmark: An app for Nextcloud that assigns tags to newly uploaded files based on some conditions
https://apps.nextcloud.com/apps/files_automatedtagging
52 stars 23 forks source link

New files that are added via `occ files:scan` are not tagged #902

Open Nibbels opened 6 months ago

Nibbels commented 6 months ago

Steps to reproduce

  1. Add some tag rules to files
  2. Upload matching files to /data/%/%user%/files/%folder% via FTP (or similar)
  3. run occ files:scan
  4. The files are not tagged.

Expected behaviour

Normal uploads are added & tagged. FTP file-uploads: If I add 'filesystem_check_changes' => 1 to config.php and then visit the folder in web UI newly uploaded files are added & tagged. Thus I would expect that that executing occ files:scan would as well tag newly added files.

Actual behaviour

Running occ files:scan does not tag added files.

What I actually want to achieve is to emulare an NVR storage in nextcloud. A camera drops files to my nextcloud instance all the time. New files should be added via occ files:scan using crontab. While scanning new files that match my tag rules should be tagged like delete-in-3-days. To delete files I use https://docs.nextcloud.com/server/latest/admin_manual/file_workflows/retention.html app which deletes all files with specific tags older than X days. Now everything seems to work, but currently I have to set 'filesystem_check_changes' => 1 and manually visit my nextcloud folders every day to have new files added & tagged - to have them deleted automatically afterwards.

List of apps that should work in combination:

Server configuration

PHP 8.3.x

Nextcloud 28.0.4

List of activated apps:

  - activity: 2.20.0
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_automatedtagging: 1.18.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_retention: 1.17.1
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0