Syncing pictures and videos

Summary: Pictures and videos disappear from the gallery for some time when they are moved to the local app folder. After restarting my phone they show up again.

I’m using the current Nextcloud Android app 3.14.0 installed via F-Droid on my Fairphone 2 running LineageOS (without Google apps) and ran into problems syncing my pictures and videos after updating from LineageOS 16 to LineageOS 17.1.

I use auto-upload to upload pictures from my /storage/emulated/0/DCIM/Camera folder to a folder called /photos and videos/ on my Nextcloud server and I pick the option to not delete but to move the original file to the app folder (the local …/photos and videos/ folder). So all pictures in my Android gallery are either not uploaded yet (and thus still located in the /storage/emulated/0/DCIM/Camera folder) or they are located in my local app folder (…/photos and videos/).

I also sync this folder /photos and videos/. For this I went to “All files”, tapped on the three dots on the right side of this folder and then on “Synchronize”. So when I delete a picture on my phone it will also be deleted from my Nextcloud server and vice versa.

Now the problem since I updated LineageOS to version 17.1 (Android 10) is that as soon as my pictures or videos are uploaded (and the original files are moved to the local app folder) they disappear from my gallery. I am absolutely sure they are present in the local app folder. When I restart the phone all those pictures and videos show up in the Android gallery and everything is fine. So I guess the problem is that the media scanner isn’t triggered or something like that…

Am I the only one affected by this? Am I doing something wrong, is this a known problem or should I write a bug report?

Update: I edited my auto-upload settings to only upload my photos and videos when I’m connected to a free WLAN and when I’m charging my battery (this is usually the case when I go to bed). I guess the media scanner is triggered while I’m sleeping as well because I didn’t restart my phone and never missed a picture in my gallery in the last days…