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

Adding an "overwrite" option when copying files #42

Open
canol opened this issue Jun 9, 2021 · 1 comment
Open

Adding an "overwrite" option when copying files #42

canol opened this issue Jun 9, 2021 · 1 comment

Comments

@canol
Copy link

canol commented Jun 9, 2021

This feature request is related to files/copy end point. Currently there is no option to overwrite a file if it already exists, when copying file from somewhere to another.

Why is this feature valuable to you? Does it solve a problem you're having?
It is a common occurrence that when copying a file to somewhere, the file might already exist in the target path. For example we have an automation script which backs up some files every night by copying them from one folder to the another folder, but the folder we are copying to every night, stays the same. So the files already exist in the target folder, but we want them to be overwritten every night.

Describe the solution you'd like
Just like in the files/upload end point, a "mode" parameter which would allow us to overwrite the target file (if exists) would make things very convenient.

Describe alternatives you've considered
We are currently first checking if the file exists, if it exists we delete the file, and then we copy it. So we need to send 3 different requests instead of 1. Also one of the requests is relatively dangerous one (delete), which might cause other issues in the future, like accidentally deleting a file/folder.

@greg-db
Copy link

greg-db commented Jun 12, 2021

Thanks for writing this up! I can't make any guarantees, but I'll pass this request along to the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants