owncloud / file-picker

Integrate ownCloud into your own product
https://owncloud.github.io/integration/file_picker/
Apache License 2.0
5 stars 7 forks source link

FP-1.12 & FP-1.13: File Conflict Resolution #248

Open dj4oC opened 1 year ago

dj4oC commented 1 year ago

As a user of the Messenger with the integrated ownCloud Infinite Scale File Picker,
I want the File Picker to consistently detect potential file overwrites, provide me options for resolution, and handle naming in line with oCIS defaults,
So that I can confidently upload files without unwanted data loss or confusion and maintain naming uniformity.


Acceptance Criteria:

  1. Proactive File Name Detection:

    • During the upload process, the File Picker should actively check if the uploaded file/folder or files/folders might overwrite existing items in the destination.
  2. Clear Conflict Alert:

    • When a potential overwrite is detected, I should receive an unambiguous notification detailing the conflict.
  3. Comprehensive Resolution Options:

    • The File Picker should offer multiple choices upon conflict:
      • Cancel Upload: Terminate the current upload operation.
      • Replace: Overwrite the pre-existing file with the new upload.
      • Version: New upload becoming successor of the original.
      • Keep Both: Preserve both files independently, renaming the newly uploaded file to avoid a naming clash.
  4. oCIS-consistent Renaming:

    • If I select the "Keep Both" option, the File Picker should rename the new file or folder using the same default naming convention as oCIS (appending a number).
  5. Bulk Upload Handling:

    • If I'm performing a bulk upload (https://github.com/owncloud/file-picker/issues/243) and multiple files are flagged for potential overwriting, I should be given the option to either apply a single resolution method to all conflicts or to address each conflict separately.
  6. Visual Clarity:

    • The conflict resolution interface should be intuitive and easily distinguishable, possibly using distinct symbols or colors for each resolution choice.
  7. Confirmation Feedback:

    • Once the conflict is addressed and the upload process continues based on my choice, a confirmation should inform me of the successful conflict resolution.

cc @hodyroff @tbsbdr @JammingBen

dj4oC commented 1 year ago

@AversaFTW Please review

AversaFTW commented 1 year ago

I think this requirement must be done by Sdui, because the messenger handles the uploads via an endpoint. The filepicker only displays all files inside the drive and is not involved in the upload. If I remember correctly, we have access to the whole file list and can check if there is a file with the same name already.

dj4oC commented 1 year ago

Would you mind if the return value is: "file exists" instead? In that case you can send a message to the user: cancel, replace, version, keep both. and send the request again with the selected option?

AversaFTW commented 1 year ago

Yes, that works.

dj4oC commented 6 months ago

@tbsbdr @kulmann Please check the test result:

siehe FP-1.08: File-Drop -> wird eine Datei hochgeladen, die den gleichen Namen hat wie eine bereits vorhandene Datei, wird die vorhandene überschrieben, ohne dass eine vorherige Abfrage erfolgt (Ersetzen, Abbrechen, Beide behalten)
kulmann commented 6 months ago

The user story can't be fulfilled. Uploads are not handled within the file picker or web embed mode. The client that is performing the uploads is responsible for file naming.