cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Cannot auto rename file

Explorer | Level 4

I'm using Dropbox Java API to upload file.

 

Following is the code to uploadFile with auto rename set to true

 

void uploadFile(@NonNull final String inPath, @NonNull final InputStream inputStream) throws IOException, DbxException {
client.files()
.uploadBuilder(inPath)
.withMode(WriteMode.ADD)
.withAutorename(true)
.uploadAndFinish(inputStream);
}

  

 

However, I can see that this does auto rename a file if it exists. Any pointers?

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Cannot auto rename file

Dropboxer
Dropboxer

Did you mean "this does not rename"?

 

Make sure you're uploading different content. Dropbox does not consider there to be a conflict if you upload content identical to what's already in that file, and the rename will only occur on conflict.

View solution in original post

2 Replies 2
Highlighted

Re: Cannot auto rename file

Dropboxer
Dropboxer

Did you mean "this does not rename"?

 

Make sure you're uploading different content. Dropbox does not consider there to be a conflict if you upload content identical to what's already in that file, and the rename will only occur on conflict.

View solution in original post

Highlighted

Re: Cannot auto rename file

Dropboxer
Dropboxer
Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Need more support?