dropbox-api-spec
dropbox-api-spec copied to clipboard
Adding an "overwrite" option when copying files
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.
Thanks for writing this up! I can't make any guarantees, but I'll pass this request along to the team.