cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

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: 

V2 API's DbxFiles.WriteMode.update() does not created conflicted copy as promised

V2 API's DbxFiles.WriteMode.update() does not created conflicted copy as promised

Christoph L.2
New member | Level 1

I am building a sync client based on the V2 API for Java. The documentation for update() states the following:

"If the rev of the file currently on Dropbox doesn't match revisionToReplace, Dropbox leave the original file alone and save your contents to a new file. For example, if the original file path is "/Notes/Groceries.txt", the new file's path might be "/Notes/Groceries (conflicted copy).txt"."

However, when I actually try this, no conflicted copy is created. The upload throws the following exception:

com.dropbox.core.v2.DbxFiles$UploadException: Exception in upload: UploadError.{".tag":"path","reason":{".tag":"conflict","conflict":{".tag":"file"}},"upload_session_id":"..."}

I could of course handle the conflict myself. But is there a way to make update() behave according to specs?

 

2 Replies 2

Greg-DB
Dropbox Staff

Are you setting .autorename(true)? You'll need to do so for it to create the conflicted copy. By default, or if you set .autorename(false), it'll yield the error instead.

Christoph L.5
New member | Level 1

That did the trick (and now I also understand that part of the documentation). Thanks!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Christoph L.5 New member | Level 1
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?