boxcli icon indicating copy to clipboard operation
boxcli copied to clipboard

Make file versioning the default behavior for Box CLI "box files:upload" command

Open bobregon opened this issue 8 months ago • 1 comments

if file versioning is the default behavior when uploading files in the URL Box web page; Why isn't that exactly the same behavior when uploading files thru the "box files:upload /path-to-file/filename.ext --parent-id FolderID" box CLI command?

The logic is straight forward:

  1. If the file does not exist in the box folder, then create the file

  2. If the file DOES exist in the box folder, then instead of displaying that horrible warning message "409 Conflict, the file already exists", please update the content of the file and increase the FILE version number.

bobregon avatar May 02 '25 19:05 bobregon

Hi @bobregon, thanks for your suggestions!

Normally in the CLI, we wrap the public API into CLI commands so that users can call any API they want without worrying that the call will do something it shouldn't from the user's perspective. In this case, there's a risk that the user could unintentionally overwrite the file version.

We'll discuss this idea with the whole team.

Regards, Artur

arjankowski avatar May 07 '25 07:05 arjankowski