Skip to content

Adding an "overwrite" option when copying files #42

Description

@canol

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions