cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

How to Undelete a File via the API

How to Undelete a File via the API

Richard T. S.
New member | Level 2

I tried to  do a restore ... that did not seem to work.

Is undelete only available via the Web interface ?

22 Replies 22

Greg-DB
Dropbox Staff

Your code is working fine to restore a file in my testing. Can you share the output you're getting (what you're logging with PersistLog)? That looks like it may contain some useful information for your particular case.

Richard T. S.
New member | Level 2

The only thing is the DBPath nothing else useful except the exception.

PersistLog just makes a copy of the error ... otherwise it's just a print statement.

 

This is in an application context .. So the file is in the top level of my APP folder.

The DBPath is: "/AccountInfo-DO-NOT-DELETE-DO-NO-SHARE"

 

Greg-DB
Dropbox Staff

What about md.Rev? The exception is reporting an invalid revision, so that value may be relevant.

Richard T. S.
New member | Level 2

mClient is the DropboxClient opened with my APP Token

Note: the call to ListRevisionsAsync worked!

md.Rev  is from the FileMetadata that is in the list of entries returned from ListRevisionsAsync.

I looked at it ... It seemed reasonable ... a string with numbers and a few letters in it ... maybe Base64 or Hex encoded ... I do not remember exactly. 

NOTE: I iterated over the list of FileMetadata returned from ListRevisionsAsync (there were 3) .. they ALL generated an exception.

 

 

 

Greg-DB
Dropbox Staff

Yes, but can you share the actual rev values? We'll look into why the API isn't accepting them.

Richard T. S.
New member | Level 2

The exception had a string of the form:  {"invalid_revision/."}

The revisions in the order of failing are:

    1512685407b     1452685407b    1442685407b

 

Greg-DB
Dropbox Staff

Thanks! With those, I was able to track down the conditions necessary to reproduce this. We'll work on a fix.

Greg-DB
Dropbox Staff

This should be working properly now.

Richard T. S.
New member | Level 2

Was this a server side issue ? Or do I need a new version of the API ? 

 

Greg-DB
Dropbox Staff

This was a server-side issue, so it should work now with the same version of the SDK. Please give it a try and let us know if you run in to any issues.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Sún B. New member | Level 1
  • User avatar
    Richard T. S. New member | Level 2
What do Dropbox user levels mean?