Skip to main content
Question

Upload file with same name

  • May 22, 2025
  • 3 replies
  • 99 views

Forum|alt.badge.img

For work with the service I use gem 'boxr'. 
For example, I upload a file with name - "test.pdf". Then I upload a completely different file, but with the same name "test.docx".

But at this point I get an error: "This file already exist". How i can fix it? Perhaps i need a setting in my account?

3 replies

Forum|alt.badge.img

 You are running into a name collision by trying to upload a second file with the same name to one folder. You have two options to fix this. The first option is to rename to the file and upload it to the same folder. The second option is to upload preserve the file name and upload it to a different folder.

 

You can also use the Preflight Check endpoint to check for name collisions before trying to upload a file. 

 

Forum|alt.badge.img

Is there any option where box will auto version the already existing file in the folder. When we will upload the new file , it will get new version. Is there any API like above. Mustafa


Forum|alt.badge.img

 the box content uploader has that baked in https://developer.box.com/docs/box-content-uploader