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?