nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.2k stars 1.75k forks source link

Auto Upload detecting deleted pictures #5225

Open arjunsarin opened 4 years ago

arjunsarin commented 4 years ago

Is your feature request related to a problem? Please describe.

I was using Google Photos for the last few years. Now, coming to Nextcloud, I miss the chance to sort photos out after they have been taken. Photos are immediately uploaded but usually I review them a few hours later. Only the best photos should remain in the cloud. Bad photos locally deleted should also be deleted online.

Describe the solution you'd like

Photos taken are automatically upload but when I delete some of them a few hours later, they are deleted in the cloud as well. I wan't to review the locally stored photos so that I can check them even without Internet connection.

Describe alternatives you've considered

It is possible to browse the photos within the NextCloud App (via Photos). This, however, requires a stable and fast internet connection. This is not sufficient for me.

Additional context

Keep in mind that it still has to be possible to delete old photos locally from the phone to free up space. In this case, of course, all photos have to stay in the cloud.

Google solves that by providing an app for managing photos on the phone. Pictures can be view locally and deleted in this app. Deleted pictures are also deleted on Google Photos online. In addition, there is a function called "Free phone space" which suggests to delete all photos already uploaded.

Feature was also discussed in the forum: https://help.nextcloud.com/t/how-does-sync-in-mobile-app-works-with-removing-files/22959/6

AndyScherzinger commented 4 years ago

cc @tobiasKaminsky @nextcloud/designers @jancborchardt for feedback

cieska commented 4 years ago

me too, regarding googles photos functionality.

arjunsarin commented 4 years ago

Meanwhile I found another solution for syncing photos:

People with similiar needs should checkout SyncThing. Peer-to-Peer synchronization. Totally different approach but it fits my personal needs and I stopped using NextCloud for photos.

However, NextCloud still is a great project and great platform. So I would definitely appreciate to see this feature someday.

marcoambrosini commented 4 years ago

I think it would be a very nice feature to have as an opt in option, what do you think @jancborchardt?

jancborchardt commented 4 years ago

Totally agree, yep. This is one big reason why I actually do not use Automatic upload. This of course creates another issue because then you need to manually upload every once in a while, which is not nice either.

So it would definitely be nice, but is it doable or technically feasible @AndyScherzinger @tobiasKaminsky?

AndyScherzinger commented 4 years ago

So it would definitely be nice, but is it doable or technically feasible @AndyScherzinger @tobiasKaminsky?

TL;DR: There would be ways to implement this but it would be quite the effort


There are two scenarios mentioned above: "manual deletions to be synced to server" (read: local deletion=>server-side deletion), "free up some space" (read: make sure files are available server-side then delete them locally).

Issues I think of:

So in order to implement this we would need to:

marcoambrosini commented 4 years ago

Sounds good, looking forward to see all this awesome photo goodness moved to a nextcloud photos android app :)

:bomb:

tobiasKaminsky commented 4 years ago

I think this is totally out of scope of the app.

Let us transfer this idea to Desktop:

So to transfer it back, I would suggest this

AndyScherzinger commented 4 years ago

I think this is totally out of scope of the app.

I think it depends on the solution. We can't sync deletions because this is impossible in my opinion since the app can never "know" why a user deleted an image (like to free space on the phone). So the way to properly detect a deletion (like you stated @tobiasKaminsky) is when such a deletion is triggered within the Nc app since we could then just ask the user what to do (delete local, remote, both; this is also how the Amazon app behaves). This would either have to be done like mentioned by @tobiasKaminsky or we would have to implement browsing within the Auto Upload screen for each of these folders, implement multi-selection and a delete action that asks which version to be deleted (local/server/both). This would mean we need to store (for performance reasons, sync-check just takes too long) which file we already uploaded and indicate this (like done in Google Photos which indicated files that haven't been uploaded yet). So the later solution is quite the effort I am afraid so unlikely to happen any time soon except if someone would be willing to implement this (I'd like to but don't have the time)

utzer commented 3 years ago

We can't sync deletions because this is impossible in my opinion since the app can never "know" why a user deleted an image (like to free space on the phone).

Why not just offer a two way sync? I don't get why this is taken so complicated, there is many cases where two way sync is useful and Nextcloud Android app is the first cloud storage app I ran into that does not offer this function. I read rumors that there was a two way sync in the early times, I guess that is a false info.

What we need is the following functions autoupload (upload only or send only), two way sync (real sync including deletions) and download (again only download from the server but all changes in the future too). That is precisely what a user would expect, what existing functions can be migrated to and what other cloud storage services offer since 2010 or so.

wis775 commented 3 years ago

As a user, I would expect a two way sync of auto uploaded files.

I‘ve set up the auto-upload feature, to have easy access to the photos of my mobile from my pc.

So, lets tell a short story.

On a trip, I take some photos with my mobile. After returning home, the auto-upload feature uploads the photos into the cloud and moves them into the app folder. On the next day, I have a look at the photos on my moblie (lets say with Samsung Gallery) and delete the „not-to-keep“ ones.

I would expect, that the deleted photos are also deleted in the cloud. Why I should delete my photos twice?

Why I use Samsung Gallery App and not the Nextcloud Client to show/delete photos: Because it’s integrated into the operating system, it can cast the photos to Chromecast and have the better usability.

utzer commented 3 years ago

As a user, I would expect a two way sync of auto uploaded files.

I can understand that and agree fully to what you wrote. Yesterday someone pointed out that I misunderstand the nextcloud client for Android, it is just a app you can use instead of the web interface, it is not a sync, download or upload client. So I wonder if that is right, if so there should be a separate sync client.

weiss commented 3 years ago

So, lets tell a short story.

I think the problem is pretty much clear. As has been pointed out above, the solution isn't totally obvious; and will either way require some development effort.

FWIW, my personal workaround for your use case is to work with two folders: The DCIM/Camera folder is not auto-uploaded to Nextcloud. I take photos into that folder and check them later on. After deleting the “not-to-keep” pics, I move the remaining photos into a Pictures/Album folder which is then auto-uploaded to Nextcloud. (I.e., the DCIM/Camera folder is like a to-do list—it's empty once I'm done going through my recent photos.)

utzer commented 3 years ago

This feature request should be changed to be more general, the requested feature should be considered for any type of files/folders. This is actually a request for more versatile synchronization between online folder and a local copy on the device.

Again summarized possible implementation is to have 3 types of sync/upload/download:

  1. Only upload
  2. Only Download
  3. Both way sync

For 1 it would mean the master copy is on the mobile device, all changes from there will be uploaded, including deletions and changes. Online changes would be lost. For 2 it would mean the master copy is online on the server. Any change on the server would be downloaded to the mobile device. Any change on the mobile device would be lost. For 3 it would mean that any change online or on the mobile device would sync. This requires some kind of conflict management, if client recognizes local and online change on a file it has to create a conflict copy and the user must deal with it, older change file could be renamed $filenameconflict$date_$time.$suffix Users can select the behaviour of the synchronization.

JSchimmelpfennig commented 3 years ago

Hi guys, I'm giving nextcloud (again) a new try and I'm currently using syncthing because it has this two way sync with a optional "delete on the other site if deleted on this site" feature. I'd really like to see this in the nextcloud app - otherwise a auto-upload of my pictures taken on my phone would result in double work: delete pictures on the mobile phone and then delete on the server manually.

Thank you :)

Screenshot_20210327-075946

zilexa commented 3 years ago

Hi guys, I'm giving nextcloud (again) a new try and I'm currently using syncthing because it has this two way sync with a optional "delete on the other site if deleted on this site" feature. I'd really like to see this in the nextcloud app - otherwise a auto-upload of my pictures taken on my phone would result in double work: delete pictures on the mobile phone and then delete on the server manually.

Thank you :)

Screenshot_20210327-075946

I highly recommend you to try FolderSync instead. Syncthing works fine for pure & 100% 2-way sync. If you need to disable syncing of delete actions or if you want 1-way sync with/without delete actions, you will hit a wall: the Syncthing UI will state out of sync errors and (if you ever disable syncing of deletes for a single folder) will never show finished sync actions for the whole device (always stuck at <100%).

I have discussed this thoroughly on their forum with their Devs and this is how they like it: the UI provides zero useful information when a user messes with the 2 mentioned options.

FolderSync app allows clear sync for 1-way and 2-way scenarios with or without delete actions, both at scheduled times and realtime.

If NextCloud would implement that, I would instantly use the NextCloud app. By default I only use CX File Explorer (it has fantastic user friendly interface, webDAV support and is free, also ad-free) for browsing files and FolderSync for syncing.

loligans commented 3 years ago

I like the idea of a NextCloud photos app. I think it could be a good solution to a few problems. Changing Auto Sync behavior in the existing NextCloud app will likely ruin someones day. We should try to avoid that as much as possible.

A NextCloud Photos app could:

  1. Get the consent of a user before deleting image(s).
  2. Permit (or restrict) image alterations and sync the changes automatically.
  3. Include NextCloud specific sharing capabilities.

I'd be open to contributing to a NextCloud Photos app because this is something I would love to have.

mrtnd commented 3 years ago

if there was i way to make the photos / media tab to behave like google photos / ios photos on deletion would be great. That would save a lot of redundant work.

cieska commented 3 years ago

if there was i way to make the photos / media tab to behave like google photos / ios photos on deletion would be great. That would save a lot of redundant work.

Like how?

mrtnd commented 3 years ago

if there was i way to make the photos / media tab to behave like google photos / ios photos on deletion would be great. That would save a lot of redundant work.

Like how?

when one deletes photos using google photos or other Gallery app those changes are not synced to the server. Deleted photos are still presented on the server and you need to delete them manually.

loligans commented 3 years ago

if there was i way to make the photos / media tab to behave like google photos / ios photos on deletion would be great. That would save a lot of redundant work.

I think NextCloud should treat all deletions from non-NextCloud apps as "local delete" operations only. If someone wants to permanently delete an image from the server they would need to go through a NextCloud app and explicitly choose delete permanently (from the server).

I think the real value of a NextCloud photos app is to provide the sync features of NextCloud in a way that is unique to images and videos. For instance it could be used as the default Gallery app for the device. It could also be used to sync image or video alterations (even possibly creating a timeline of edits to revert back to if need be). It could have a basic editor. Taking the editor thing to the next level, it could proxy the image or video to a more complex editor that when the editing session is completed, the editor returns the new content to the NextCloud photos app which then would be synced up to the server.

derykl commented 3 years ago

Yes, in light of recent revelations of even Apple throwing away the notion of privacy, I'm trying to move to private and independent solutions rather than relying on Apple or Google and replacing the photo apps is a major pain point right now. I'm used to the behaviour on Android that you'd use Google Photos as the gallery app and deleting from that deletes from local, or the behaviour on iOS where it simply deletes on both with a warning.

FolderSync is so close to being a reasonable compromise, except it doesn't seem to work with e2e encrypted folders. As I'm using a 'cloud' server that I don't own, I'd rather they stay encrypted, so it's almost but not quite the right solution...

utzer commented 3 years ago

For those who have Android and want to sync both ways "in Nextcloud", you can install Synching on both, the server and the Android device and then synchronize the folder both ways with Syncthing and add the server Syncthing folder to Nextcloud as an external folder. If you need help to do so, ask me on the Fediverse.

For the rest of the discussion, I don't like software that "wants to keep me safe", I want software that can mess up everything if I am to stupid, if that it the price to pay for a useful function.

How about the mentioned idea to warn users setting up a two way sync folder, that every change in the local folder or in the remote folder on the server, will be synchronized (deletions included). Come on this is how cloud storage worked since before it was called cloud storage. I was a customer of Dropbox when they opened their service to the public, it was working like that there too.

So please add that function to the mobile app and do not make us find solutions to circumvent this shortcoming of Nextcloud mobile client.

GambaJo commented 3 years ago

two way sync would be nice. especially for the auto upload folder.

bes1002t commented 3 years ago

Hi guys, I'm giving nextcloud (again) a new try and I'm currently using syncthing because it has this two way sync with a optional "delete on the other site if deleted on this site" feature. I'd really like to see this in the nextcloud app - otherwise a auto-upload of my pictures taken on my phone would result in double work: delete pictures on the mobile phone and then delete on the server manually.

Thank you :)

I would recommend to open a new ticket for a new request. If I understand correctly your initial request was a "sort by date taken" feature for photos. I would love such an feature as well, but we should keep the tickets clean, otherwhise nobody will read it.

cieska commented 3 years ago

My way of doing is taking pictures with the phone and leaving it until the phone memory fils up and then delete the very oldest ones. And when I'm on the desktop I'm reviewing pictures to delete that synced to my computer storage. then deleted pictures also deleted in Nextcloud. The other way if all deletes on the phone are synced to the nextcloud will be a critical issue when phone memory fills up, then it will be even more complicated.

utzer commented 3 years ago

The other way if all deletes on the phone are synced to the nextcloud will be a critical issue when phone memory fills up, then it will be even more complicated.

Therefor there should be Folder that are upload only folder, which is the case right now, and sync folders, which sync all changes between every sync peer.

The way I do it: I take photos with my mobileS those are then synced to my computer, I use Syncthing for this, as Nextcloud lags the needed function of synchronizing. Seconds after I took a photo it is synced to my computer, there I review it and will then sort it to the right folder if I want to keep it or delete it right away, the deletion (moving/sorting it to some third folder is like a deletion too) will then delete it from my phone, which is helpful so that I don't run out of space on my phones.

icasdri commented 3 years ago

I agree that two-way sync would be nice to have as an option. However, when this is implemented, can this please be labelled clearly as "Two-Way Sync" separate form "Auto Upload"? To me "Auto Upload" implies one-way upload (no synced deletions), and as some have mentioned above, I do deletions manually on device when device storage fills up and I do not expect them to be deleted from the server. If the default behavior or the behavior labelled as "Auto Upload" changes, users will lose data.

stephen304 commented 2 years ago

I would love for a feature similar to the google photos "free up space". I like the auto sync because I often grab the photo from my computer when it syncs, and I only need photos on the phone for a short time after taking them if I want to send or post it immediately.

There is an option to delete photos after uploading, which I may use, but it will be slightly annoying if I want to share something I just took since I will have to download it again. I prefer just manually running a cleanup task at my own discretion.

bonswouar commented 2 years ago

Adding that feature as an option would be really great! And as @utzer pointed out earlier it should be more general, for any sync folder, not just Photos. (could we change the title of the issue maybe?)

One useful case would be to automatically remove old backups that are in NC sync folders, for example the ones generated by Signal or any app the provides this kind of feature (on the phone only the last ones are kept).