Web: Conflict handling on upload

Created on 10 Jan 2019  Â·  12Comments  Â·  Source: owncloud/web

The old frontend had a conflict dialog whenever the user uploaded a file into a folder that already had such file in there.

The conflict dialog let the user pick between "keep current (don't overwrite)", "overwrite" or "auto-rename".

The dialog itself also handled multiple file uploads, so the user could solve conflicts for multiple files at a time.

In the context of Phoenix we need to think whether such pattern is still needed or whether there are better UX patterns to cover such use cases.

@DeepDiver1975

Enhancement

Most helpful comment

```gherkin
Scenario: User upload a new file
Given the file hello.txt does not exist
When the user uploads a file named hello.txt
Then the file is uploaded and appears in the file list

Scenario: User uploads a file which already exists
Given the file hello.txt already exists
When the user uploads a file named hello.txt
Then a notification is displayed that the file already exists and cannot be uploaded
And the file will not be uploaded

Scenario: User uploads a file which already exists in the server but is not visible in the client
Given the file hello.txt already exists on the server
And the file does not exist on the client
When the user uploads a file named hello.txt
Then the file is uploaded to the server
But the server response with 409/Conflict because the file exists

All 12 comments

This has to be handled under different scenarios.

  • Upload new file
  • Upload new version of one file
  • Upload multiple files (all new?)
  • Upload a full folder

^ the conflict resolution is different under each of these scenarios

in the the old UI it was the same handler for all these

also note, the autorename, if we still want it, must be implemented on the client side as well.
in the old code we renamed then pinged the server until the 409 Conflict (or 412 precondition failed?) disappears

autorename and upload new version of file are somehow excluding each other from my pov.

we need to write down each scenario (gherkin) and make decisions ... I'll take care

Maybe implement "upload new version" first and have it as default, and add other behaviour as an option later…

(I think upload from web UI on iOS uploads EVERY image with the same name)

```gherkin
Scenario: User upload a new file
Given the file hello.txt does not exist
When the user uploads a file named hello.txt
Then the file is uploaded and appears in the file list

Scenario: User uploads a file which already exists
Given the file hello.txt already exists
When the user uploads a file named hello.txt
Then a notification is displayed that the file already exists and cannot be uploaded
And the file will not be uploaded

Scenario: User uploads a file which already exists in the server but is not visible in the client
Given the file hello.txt already exists on the server
And the file does not exist on the client
When the user uploads a file named hello.txt
Then the file is uploaded to the server
But the server response with 409/Conflict because the file exists

Scenario: User uploads a file which already exists in the server but is not visible in the client
  Given the file hello.txt already exists on the server
  And the file does not exist on the client
  When the user uploads a file named hello.txt
  Then the file is uploaded to the server
  But the server response with 409/Conflict because the file exists

not sure how this scenario will happen - i'll take care of the 2nd scenario, the first scenario should work as described

not sure how this scenario will happen -

Steps to reproduce this:

  1. open phoenix in browser tab A
  2. open phoenix in browser tab B
  3. upload hello.txt in tab A
  4. DO NOT RELOAD TAB B
  5. upload hello.txt in tab B
  6. get conflict ...

for now i still can't reproduce the 3rd scenario - i tried it but after i fixed the second scenario i couldn't reproduce the 3rd. It just uploads the file, and don't return an 409... Am i missing something.

I will have a look. Maybe we miss Something. The File shall Not overwrite.

I Take Care of this ....

I'll open an PR for my current state which is just a short find to sort out if file is existing

take care of as far as possible -> close

any new findings shall result in new issues

Was this page helpful?
0 / 5 - 0 ratings