Auto Upload Not Working

Dev Cloud Version = 20171204
NextCloud Version = 2.0.0
Android = 6.0
Kernel = 3.10.84
Phone = LG V10

When I try to auto upload my camera gallery it will not upload, only new pictures I take, nothing before setting up auto upload. I have tried both Versions on NextCloud and I have tried changing the default location to a different folder and it still wont upload. I can upload single files. I tried auto upload on my gf Iphone and it worked just fine and uploaded everything.

Hi @migit13,

this is the actual behavior of the app, see https://github.com/nextcloud/android/issues/285 for the auto upload roadmap. At this very moment the app only detects newly taken pictures after setting up auto upload. So to get the older pictires to the server you would have to manually upload them.

When is the fixed going to happen? It seems like it been going on for a year now?

It actually is a feature extension not being started to implement yet. Focus at the moment is to get end-to-end encryption ready for release so my guess would be that it won’t be started before next year. Though if somebody besides the regular contributors jumps in it might happen rather sooner than later.

The Autoupload-Function is broken in Android. It just works sometimes, and sometimes not. Tryd different smartphones, same behavoir.

@klm46 can you please open an issue over at Github https://github.com/nextcloud/android/issues when it is work, when it is not depending on device and maybe “situation”? Highly appreciate your help :slight_smile:

I have a potential workaround for anyone else who finds themselves with a problem similar to OP!

My problem was similar: if I selected a folder of pictures on my phone for auto upload, nothing already existing would upload, but NEW additions would upload.

So, you sync the folder you want to auto upload, create a temporary directory somewhere in your phone using your file browser, move all the files to the temp directory, and then finally move them back again. I think if their time stamp gets updated in the process that’s what causes them to be recognized as new additions to be uploaded to the cloud.

My guess is you can alternatively: sync a folder, connect the phone to a Linux computer, and use a shell to “$ touch ./*” all the files inside the directory and this will also trigger an upload.

Hopefully this helps someone!

Actually now I think the file time stamp is not what’s important, but that you open up the Nextcloud app and give it a chance to see that your target directory is empty before you move the files back into it.

It’s the timestamp + a file hash :slight_smile:

1 Like

ok found solution:
you have to use cron job as described here instead of ajax:
https://docs.nextcloud.com/server/12/admin_manual/configuration_server/background_jobs_configuration.html
Also run webserver as root not www-data, and on Admin->Basic settings make sure to select cron, then leave client webpage running 24x7, if you use windows you have to disable firewall.
HTH

Please, never run the webserver as root or disable your entire firewall. Take a few minutes to search how to allow a single program and port through. Running as www data means that a mistake in your configuration or a zero day vulnerability only provides access to the apps files and permissions. Finding exposed Nextcloud servers is trivial, so please be careful:
https://www.shodan.io/search?query=nextcloud

Sidestepping these important security measures are not solutions, they just open your box to getting owned.

This looks like ill advice which I would never follow. This way you are opening up a whole in the wall you cannot find a plug big enough to close it. If software systems nowadays still require things like you propose, I wouldn’t even consider to run it. And to be on topic here: no this is not required.