Unable to view Uploaded files in de WebBrowser

Nextcloud version: 21
Operating system and version: Ubuntu 20.04
Apache or nginx version: Apache2
PHP version: 7.4

The issue you are facing:

I have a Windows server where I Host my shares and data. I have created a Linux Mount point on the NextCloud Ubuntu server which points to the windows share. Then I created a local external storage point to that mounted share. I am able to upload my photo’s to that share without any issues. The files are being uploaded and I can see them on my windows server. When I then want to view the files that have been uploaded to nextcloud, i can see them but without any previews. And when I click on one picture is gives the following error:

File not found

The document could not be found on the server. Maybe the share was deleted or has expired?

[Back to Nextcloud]

In the logging is see the following error:
[no app in context] Warning: Invalid data provided to provideInitialState by files

GET /index.php/apps/files/

try php occ files:scan -all at commondline in your installing directory (manual knows correct syntax for that command)

And try searching the forum for already existing problems similar to yours before opening a new thread, next time.

This does nothing, I have already tried this.
It does find all the folders and files. But again when I click on a picture in the GUI it is unable to find the file.

I indeed saw similar issues but non of them offered a solution or had the configuration that I have.

who owns the files and folders? and what about ther persmissions set there?