Skip to main content
Question

Upload API Conflict File Name

  • May 21, 2025
  • 3 replies
  • 35 views

Forum|alt.badge.img

Hi,

 

I was working on Box API to upload files using Service Account User and I am able to upload the files.

Here I have a scenario is I want to upload a new file with existing File Name. In this scenario I am getting 'file name Conflict error'. Is there any box API which will checks for the file name of existing box file names and auto update the new file name with an end of '1' or '2' etc.

 

For Example :

 

Existing Box File : test.png

New Box File : test.png , then box will give an error of File name conflict, in this scenario If there is any api which will auto update the box file name to test (1).png. 

 

 

Could you please help us in this. 

 

 

Thanks,

Srikanth

3 replies

Forum|alt.badge.img

 The Preflight Check endpoint can be used to check for name collisions before trying to upload a file. We don't have a way through the API to automatically rename a file if there is a name collision, so you would have to rename the file before uploading it.


Forum|alt.badge.img

When uploading photos from my iPad Photo Album off my Canon or Panasonic cameras, I am unable to rename before uploading. Had this problem for ages, then I realised that renaming all the Full Size Render photos, that did upload to Box, then got rid of the Naming Conflict and it continued to upload the rest of my files. Of course the big question is, how come they're the same name and are not IMG.... as off the camera? Why do some change to the file name Full Size Render?


Forum|alt.badge.img

Are there any future plans to resolve this without a preflight check?