Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle duplicate file uploads elegantly #2127

Open
FSM1 opened this issue May 11, 2022 · 2 comments
Open

Handle duplicate file uploads elegantly #2127

FSM1 opened this issue May 11, 2022 · 2 comments
Labels
Planning: Needs Clarification 🔍 Added to issues relating to a low severity bugs.

Comments

@FSM1
Copy link
Contributor

FSM1 commented May 11, 2022

Is your feature request related to a problem? Please describe.
Currently duplicate file uploads are not handled very well. The API will respond with a 409 error, and a notification will be displayed, but no further action will be presented to the user.

Describe the solution you'd like
If a file with the same name already exists, a pop-up should be displayed to the user to allow them to either

  • Rename the newly uploaded file
  • Overwrite the existing file

image

@FSM1
Copy link
Contributor Author

FSM1 commented May 18, 2022

Discuss the API changes with the team and continue scoping this out.

Preliminary idea is to make a request to the API with a full list of files to be uploaded, and the API to respond with any possible conflicting file names, as well as valid name that the file can be renamed to (if user wants to keep both files).

@FSM1 FSM1 added Planning: Needs Clarification 🔍 Added to issues relating to a low severity bugs. Planning: Needs estimation and removed Planning: Needs estimation labels May 30, 2022
@FSM1
Copy link
Contributor Author

FSM1 commented Jun 3, 2022

@dhyaniarun1993 API now returns a 409 in the event of a duplicate file upload anywhere in the request. Any files that are valid will be stored correctly in the filesystem. The API will respond with the file name that is a duplicate, as well as a suggestion of the name that the file can be renamed to -

i.e. if a path contains:

  • a.txt
  • a (1).txt

and the user attempts to upload a file called a.txt the API would respond with a valid name of a (2).txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Planning: Needs Clarification 🔍 Added to issues relating to a low severity bugs.
Projects
None yet
Development

No branches or pull requests

1 participant