android icon indicating copy to clipboard operation
android copied to clipboard

Synchronize should also upload locally created files

Open radry opened this issue 3 years ago • 23 comments

Steps to reproduce

  1. Tab ... menu next to a remote folder and select "Synchronize"
  2. Wait for the download to finish
  3. Locally on the Android device change a file or create a new file/folder in the directory that was just "synchronized"
  4. Repeat step 1

Expected behaviour

  • As the name "Synchronize" suggests, the locally changed or newly added file should be uploaded to the remote folder.

Actual behaviour

  • Nothing get's uploaded

Conclusion

  • The feature "synchronize" does in fact not synchronize anything but only downloads the remote folder to make it available offline. It should be labeled "Make available offline"

Environment data

Android version: 11

Device model: Galaxy tab S7

Stock or customized system: Stock

Nextcloud app version: 3.15.0

Nextcloud server version: 20

radry avatar Feb 27 '21 18:02 radry

It also synchronizes content if the file is changed locally, but you are right that it does not upload newly added files.

tobiasKaminsky avatar Mar 01 '21 13:03 tobiasKaminsky

@tobiasKaminsky I intentionally named the issue that way because in the current state it is mislabeled and thus a BUG. This isn't a feature request for 2-way sync, we have other issues for that

radry avatar Mar 01 '21 17:03 radry

True, in short term we can rename it, so it is more clear. Do you have an idea? "Synchronize existing files" maybe?

tobiasKaminsky avatar Mar 02 '21 08:03 tobiasKaminsky

I'm getting mixed information from you here you claim that downloaded files (which I think applies to "syncronize" too?) Do indeed synchronize.

Can you or someone else please elaborate what exactly "downloading" a remote file or using the "synchronze" function does? As I explained in the issue, it seems to me that it only downloads remote files but doesn't consider changes to downloaded files, nor detects new files. This is really confusing.

radry avatar Mar 02 '21 17:03 radry

Sync on a folder does:

  • download all files from server
  • updates all files from server
  • uploads any change of existing files on server
  • does not upload new files

tobiasKaminsky avatar Mar 05 '21 08:03 tobiasKaminsky

I agree with @radry, this is confusing that sync doesn't upload new files in synced folders. As all the files are synced this feature should be named "make available offline" or similar.

I also noticed while in airplane mode, synced files are read only, which literally kills the purpose of offline files.

Other than that, NextCloud is really impressive product.

farynaio avatar May 10 '21 00:05 farynaio

Was unhappily surprised when I realized, that Sync doesn't upload locally created files 😟 I'll highly appreciate if you add this feature because syncing files across different devices is one of the main points of using NC for me.

weiss-d avatar Aug 01 '21 04:08 weiss-d

This feature, please!

joshgiesbrecht avatar Dec 01 '22 02:12 joshgiesbrecht

Hi. iOS has been having it for a while. Is it really different (code wise) to activate it for Android as well?

squid-f avatar Dec 12 '22 12:12 squid-f

Bumping this, started using Obsidian recently and was expecting a two way sync like on the desktop.

If I add a new file in windows under a Nextcloud folder it gets uploaded to remote. If I do that on Android the file isn't detected (can't see it from the Nextcloud app) and doesn't get uploaded.

EBendinelli avatar Dec 15 '22 10:12 EBendinelli

Tried to use obsidian as well. Once I synchronized I was really unpleasantly surprised that it does not sync newly created files.

PS: syncing new files is one of basic features you need in a cloud client. Cloud is used as a backup many times and this does not allow you to backup anythig... Apart from photos. I want to backup my sms for example, but the app does not upload new backup files... This app is literally useless for me... Please change the label (and implement this).

jiriks74 avatar Dec 18 '22 05:12 jiriks74

Same here: Usecase is Obsidian. Makes no sense at all that the label is labeled "Sync Folder" in that case. My expectation was exactly that it would sync what happens in my local folder, too. Syncing means keeping things in sync. So I vote as well for either renaming the label or adding the functionality as syncronization. My vote intends the actual syncing.

PS: I would really like to understand the reason why this is implemented differently. Is there a technical problem with this?

cukabeka avatar Jan 06 '23 19:01 cukabeka

As a workaround: Wouldn't it work to set the folder to "sync" and also add it as an auto-upload folder to get full 2-way-synch?

Discostu36 avatar Jan 16 '23 14:01 Discostu36

Besides, I think this is a duplicate of #19

Discostu36 avatar Jan 16 '23 15:01 Discostu36

As a workaround: Wouldn't it work to set the folder to "sync" and also add it as an auto-upload folder to get full 2-way-synch?

I'm not sure what you're proposing but I've played with auto-upload thinking it could be the solution without success.

What I had done was to have a folder in Android (say /Documents/Obsidian-vault) and select it as auto-upload in Nextcloud. This solved the issue of not having new files created in Obsidian seen and uploaded by Nextcloud. Basically, creating a file within Obsidian would trigger auto-upload and now my folder server-side would be up to date.

The issue with this is that updating files server-side (say after using Obsidian on the desktop) isn't reflected on the phone. Auto-upload is unidirectional as far as I can tell, it copies everything that is created locally to remote but won't do the opposite.

I tried to cheat and select the already locally sync folder inside the Nextcloud (/storage/emulated/0/Android/media/com.nextcloud.client/Obsidian-vault) but that doesn't seem to work. Files created in Obsidian aren't detected and uploaded.

EBendinelli avatar Jan 16 '23 15:01 EBendinelli

I'm not sure what you're proposing but I've played with auto-upload thinking it could be the solution without success.

I tried to cheat and select the already locally sync folder inside the Nextcloud (/storage/emulated/0/Android/media/com.nextcloud.client/Obsidian-vault) but that doesn't seem to work. Files created in Obsidian aren't detected and uploaded.

Yeah, that cheat was the idea I had. Too bad it doesn't work.

Discostu36 avatar Jan 16 '23 15:01 Discostu36

What worked for me was to add a new folder under "Settings" -> "Auto upload". Now new files in this folder will appear automatically on the server. Really strange that this is so hidden.

karussell avatar Mar 16 '23 17:03 karussell

what worked for @karussell seems to have worked for me, but yes this interface is very strange. I wish it worked like the desktop where you could manually set some folders to sync in one place

dantescanline avatar Jul 25 '23 14:07 dantescanline

I also need this, often times I need to modify/create some pdfs (taking notes during lectures for example) on my tablet and synchronize them as soon as a connection is available (it not always is)

belst avatar Nov 29 '23 18:11 belst

The core feature of Nextcloud, with an issue open for 2.5 years?

Fmstrat avatar Dec 05 '23 12:12 Fmstrat

What worked for me was to add a new folder under "Settings" -> "Auto upload". Now new files in this folder will appear automatically on the server. Really strange that this is so hidden.

This doesn't fully work. You can do this and set up folder sync for the folder, so you get downloads and uploads, but if you rename a file, now the server has 2 copies.

Fmstrat avatar Dec 05 '23 12:12 Fmstrat

Waiting for this since years, and really expected this to be a core feature of a cloud app.

My workaround is to use FolderSync Unfortunately i don't find an app in F-Droid for that purpose.

Solar-Simon avatar Feb 08 '24 10:02 Solar-Simon

Waiting for this since years, and really expected this to be a core feature of a cloud app. First suggested in November 2017 https://help.nextcloud.com/t/nextcloud-android-app-automatically-sync-files-folders/23123 I also am using obsidian with nextcloud and this makes it impossible

erentar avatar Feb 17 '24 18:02 erentar

I'll just pile on this and say I figured out this didn't work the same way @erentar did: through Obsidian. I used @Solar-Simon's solution of FolderSync

tsjordan-eng avatar Feb 24 '24 02:02 tsjordan-eng

Isn't this issue a duplicate of

  • #19

sunjam avatar Feb 24 '24 03:02 sunjam