Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
sthigale
8 years agoExplorer | Level 4
Cannot auto rename file
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?
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.
2 Replies
- Steve M.8 years ago
Dropbox Staff
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.
- Greg-DB8 years ago
Dropbox Community Moderator
[Cross-linking for reference: https://stackoverflow.com/questions/45397501/dropbox-does-not-auto-rename-file-during-upload ]
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!