owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.84k stars 3.05k forks source link

Duplicated uploads from android client - even in same directory #1922

Open hodyroff opened 7 years ago

hodyroff commented 7 years ago

@nneul commented on Sun Mar 12 2017

Expected behaviour

Sharing a file multiple times with OwnCloud client on android should not result in multiple duplicate copies of the file in the instant upload directory.

Actual behaviour

Multiple files created with (2) in the name for example, even though they are checksum identical.

Steps to reproduce

  1. Allow a file to automatically instant upload
  2. Share file explicitly with oc - typically as a "I want to make sure everything is uploaded" share in a big batch.

Client configuration

Client version: 2.3.0 Operating system: Android

I understand your view that in general OC should not concern itself with duplicate uploads/files/etc. but this is a bit of a more relevant/important edge case with mobile. I think there should either be a means to check and avoid duplicating files during upload process when the files are being uploaded to the SAME directory.


@hodyroff commented on Mon Mar 13 2017

This issue happens on Android, right? Please give us some more information about the Android version you are using and how exactly it can be reproduced. "Share file explicitly with oc" ... I don't understand. Which menu entry in Android are you using to do that?

nneul commented 7 years ago

Seen it on multiple versions, reproduced with current 7.0 on an sgs7.

To reproduce - go to any file explorer application or the photo gallery - select a bunch of photos or files, click "Share" icon, choose owncloud from the application list. Owncloud will pop up and ask you for a folder to share them to. Pick the folder - in my case, I'm choosing the folder I'm using for instant uploads since I'm wanting to upload a bunch of files that were missed due to having instant upload turned off - but there is some overlap with when it was.

If files were already uploaded, it will create duplicate+renamed files - even though an exactly matching file already exists in the same folder.

davivel commented 7 years ago

@nneul, would be enough for your use case if the app checked collisions in the names of the files and asked to the user if should overwrite, duplicate or ignore the colliding files?

nneul commented 7 years ago

I think that would be a huge improvement! I think longer term it would be nice if the client did some smart dedup for transfers over the network, but this would be a great incremental improvement. (I understand not deduping on the server - since that rightly should be done by filesystem - but filesystem dedup doesn't help for network transfers if the client isn't aware of it.)

Please make sure that it prompts for that resolution action up front at time of share - since the expectation here is that I'd be selecting a large list of files to ask it to share/upload, and then leaving it to slowly do it's uploading. If it hits a new conflict AFTER the upload has started - then just have it error/fail that file.

davivel commented 7 years ago

Please make sure that it prompts for that resolution action up front at time of share .

Sure. We were talking recently about improvements needed in our uploads, and this kind of UX details is one of our main concerns.

The only thing... I can't compromise right now to any time of availability for this enhancement. We need to review priorities, and have a long tail of issues pending for next release.

jesmrec commented 7 years ago

The current behaviour of the iOS app takes in account this kind of scenario. Maybe we could use it as reference.

michaelstingl commented 7 years ago

@jesmrec Yes, same behaviour in iOS and and Android app would be cool.