Incorporate externally uploaded file?

I wanted to upload a relatively large file (a video) to Nextcloud, but it kept stopping (it was well within the upload size limits). After trying several times and failing, I decided to try to upload it directly into the file system, not using Nextcloud.

That succeeded without problems.

So now I have the situation that the file is sitting in the correct Nextcloud files folder, BUT Nextcloud doesn’t “see” it. It doesn’t know it’s there.

I can well imagine why that is the case: probably Nextcloud creates an index entry, etc. etc. when it uploads files, and since I didn’t use Nextcloud to do the upload, it doesn’t have such an index entry for the file.

But I am curious: do you know of any way to create that entry? To “incorporate” the file into the Nextcloud file system so that it “sees” it?

Thanks,

John

Hi John,
it is possible to ask Nextcloud to scan directories to add files not present in nextcloud.

Example with the user toto in his /password directory:
sudo -u apache php /var/www/nextcloud/occ files:scan --path="/toto/files/password"

Cordially

Arnaud