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

Copy and move to a folder where the resource already exists #3751

Closed
LukasHirt opened this issue Jul 8, 2020 · 5 comments
Closed

Copy and move to a folder where the resource already exists #3751

LukasHirt opened this issue Jul 8, 2020 · 5 comments

Comments

@LukasHirt
Copy link
Collaborator

Since current behaviour overwrites the original resource, I put there an error message and do not execute the action to prevent data loss. Much better behaviour could be IMO to append a number after the resource name.

I guess this should be done at the API level instead of the client, right? @DeepDiver1975 @PVince81

@LukasHirt LukasHirt mentioned this issue Jul 8, 2020
6 tasks
@DeepDiver1975
Copy link
Member

WebDAV move/copy can either overwite the existing target or fail with an error.
Any different behavior has to be implemented in the client.

Generally speaking overwrite shall only be done after user confirmation - but this is a UX topic ....

@PVince81
Copy link
Contributor

PVince81 commented Jul 9, 2020

Webdav API usually doesn't have a mechanism to automatically rename.

It might be possible to send a header "If-None-Match" with the value "*" which means "only proceed if the target does not exist". That works at least for PUT, need to check if COPY checks that also.

Then if it fails with 409, display the overwrite dialog.

@PVince81
Copy link
Contributor

PVince81 commented Jul 9, 2020

and if the user does allow overwrite, retry the operation with the overwrite header on COPY

@hodyroff
Copy link

My user view:
Anything which can lead to data loss should have a security question. It seems the user has three options then, two are "normal" in Windows file explorer:

Cancel the request
Allow to write anyway (I know what I am doing)
Not in Windows: 3) Write with a different name (standard owncloud practice is to append (2), (3), etc. I need to select my name, but in Windows I can write the proper file name right away ...
If the action covers multiple objects, Windows Exporer allows me to repeat the same action above for all objects.

Special for us: The file (or maybe folder in the future) could also be locked. What happens then?

@tbsbdr
Copy link
Contributor

tbsbdr commented May 17, 2022

closing in favour of more actionable ticket: #6996

@tbsbdr tbsbdr closed this as completed May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants