Because I didn’t understand what was happening during auto upload, I reflashed my POCO F2 with a clean LineageOS 18.1 / Android 11 and GApps first. Then Installed “Total Commander” to have a simple view into the file system.
Then I took 2 pictures with the buildin camera app. One of these pictures I moved from “DCIM/Camera” to “Download”.
On the server side (Manjaro-Linux machine in my LAN) I created a new folder “Upload-Test” in Nextcloud and copied a 2 pictures from anywhere to the folder.
After preparing this, I have installed NextCloud Client 3.18.0 from froid-store, and conneted the client to my server. All fine so far.
All folders are visible. I can download a picture from server to the phone. And I’m able to delete it.
Ok. Only 1 file remains at server side “Upload-Test” after this initial test.
To start “auto-upload” test on the phone I just took a new photo. The Client App opens and asks for configuration. I choosed “upload existing files”, “keep original” and set “remote folder” to my “Upload-Test” folder.
After activating all my files are synced to server as expected. Wow, fine.
Then I copied the saved file from Download to DCIM/Camera. But nothing happend. Hm.
I renamed the file. Nothing.
I copied the file. Nothing.
I changed timestamp with total commander. Nothing.
Then I took a new photo and the new file is transferred instantly to the server.
Finaly I edited the non uploaded file within gallery. The canged file is transferred too.
Next day I took again a copy of the “not transferred” picture, within the DCIM/Camera folder.
Ups. This time the file is transferred. The server says. Changed 15 hours ago …
There are many kinds of creating a new file. I have seen this common used variants in windows…
- open file, write data, close file
- open file & close file (creating a 0 byte file), reopen file, write data, close file
- creating a new file anywhere and rename&move the final file to destination
So I guess, there is a problem in handling with “FileObserver” in combination with cache.
Maybe that Nextcloud client did not handle all file creation/change methods …
Henning