Rescan Files in Nextcloud
When modifying the data directory content outside of nextcloud, you need to update the database using the command:
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
If you need to rescan files of only one user, specify the user ID instead of --all