android icon indicating copy to clipboard operation
android copied to clipboard

Auto Upload detecting deleted pictures

Open arjunsarin opened this issue 5 years ago • 30 comments
trafficstars

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

arjunsarin avatar Jan 17 '20 23:01 arjunsarin

cc @tobiasKaminsky @nextcloud/designers @jancborchardt for feedback

AndyScherzinger avatar Jan 20 '20 09:01 AndyScherzinger

me too, regarding googles photos functionality.

cieska avatar Jan 20 '20 23:01 cieska

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.

arjunsarin avatar Feb 24 '20 16:02 arjunsarin

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

marcoambrosini avatar Jul 06 '20 04:07 marcoambrosini

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?

jancborchardt avatar Jul 07 '20 13:07 jancborchardt

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:

  • a manual mass deletion would lead to a mass deletion on the server so people already using the app likely won't expect this (and will loose their data; I am aware of the trashbin...) -> this would be handled via the "opt-in" character of the feature of course (still one might forget about it, like "usb connection, delete all photos...")
  • We don't have a Nextcloud Photos app as-in any actions on images are handled through our app (if you delete stuff outside Google's photo app, they don't care, neither should we).

So in order to implement this we would need to:

  • Extend the Auto Upload view(s) to browse all local images and visually show if available on server
  • Add deletion action within such a view (might have issues with file permission, so this might not work or break based on (future) Android version(s)
  • have a sync mechanism to even know which files have been uploaded already (we don't store this info yet and also don't have a check/compare mechanism as of today)

AndyScherzinger avatar Jul 07 '20 16:07 AndyScherzinger

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

:bomb:

marcoambrosini avatar Jul 08 '20 06:07 marcoambrosini

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

Let us transfer this idea to Desktop:

  • you have your image colletion in /home/user/tobi/images
  • you add two images there
  • Desktop client should detect this, upload it and then remove it, if you delete it there?
  • in fact Desktop client is doing a total "stupid" 2 way sync of any file within its folder, but does not tamper at all with any file outside it

So to transfer it back, I would suggest this

  • upload images via auto upload & move file inside NC folder
  • have a real 2 way sync (we do not have right now)
  • delete any file you wish -> gets also deleted on server

tobiasKaminsky avatar Jul 24 '20 12:07 tobiasKaminsky

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)

AndyScherzinger avatar Jul 24 '20 13:07 AndyScherzinger

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.

utzer avatar Nov 15 '20 21:11 utzer

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.

wis775 avatar Nov 16 '20 19:11 wis775

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.

utzer avatar Nov 16 '20 21:11 utzer

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.)

weiss avatar Nov 17 '20 09:11 weiss

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 $filename_conflict_$date_$time.$suffix Users can select the behaviour of the synchronization.

utzer avatar Nov 23 '20 12:11 utzer

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

JSchimmelpfennig avatar Mar 27 '21 06:03 JSchimmelpfennig

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.

zilexa avatar Mar 29 '21 15:03 zilexa

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.

loligans avatar Jul 26 '21 06:07 loligans

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.

mrtnd avatar Aug 04 '21 12:08 mrtnd

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?

cieska avatar Aug 04 '21 17:08 cieska

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.

mrtnd avatar Aug 04 '21 17:08 mrtnd

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.

loligans avatar Aug 07 '21 23:08 loligans

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...

LakesGeek avatar Aug 12 '21 09:08 LakesGeek

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.

utzer avatar Aug 12 '21 10:08 utzer

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

GambaJo avatar Aug 12 '21 12:08 GambaJo

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.

bes1002t avatar Sep 01 '21 11:09 bes1002t

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.

cieska avatar Sep 01 '21 18:09 cieska

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.

utzer avatar Sep 08 '21 07:09 utzer

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.

icasdri avatar Oct 02 '21 19:10 icasdri

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.

stephen304 avatar Jan 18 '22 03:01 stephen304

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).

bonswouar avatar Aug 02 '22 11:08 bonswouar