Can you spare 5 minutes to help us improve our online support experience? Get involved!

Java Api upload same file rename not working

New member | Level 2

Hello everybody,
from 12.30 on 10/15/2019 the Dropbox Api java does not force the renaming of the existing files.
Load the file xyz.pdf and dropbox, correctly, assigns me the id <id: xxx> but when I re-upload the same file xyz.pdf the rename does not work:
I expected the file to be renamed to xyz (1).pdf and the id returned <id: zzz>

I use dbxClient V2

below part of the code with which I impose the rename
UploadBuilder fileUploader = dropboxClient.files (). UploadBuilder (pathFileName);
fileUploader.withMode (WriteMode.ADD) .withMute (Boolean.TRUE) .withAutorename (Boolean.TRUE);

is there any news about it


1 Reply

Re: Java Api upload same file rename not working


Apologies for the very late reply. Our forum software did not notify me of this post unfortunately.

Anyway, in this case were you uploading the same exact file content? Even with WriteMode.ADD, if you just upload the same exact file content that is already uploaded at that path, it won't add another copy. 

You can find more information in the WriteMode documentation. Here's the relevant part in this case:

If the target path refers to a file with identical contents, nothing gets written; no conflict.

API Support

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about API Support.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post