Forum Discussion

MateusP's avatar
MateusP
Helpful | Level 6
9 years ago
Solved

metadata.rev in API v2?

Better late than never, I'm trying to migrate my Android app to API v2.  Currently, when downloading a file from a user's linked Dropbox account, I first obtain the file revision...   @Override pro...
  • MateusP's avatar
    9 years ago

    OK so I worked it out and it's really simple -  you just cast to FileMetadata...

    FileMetadata metadata = (FileMetadata) mDbxClient.files().getMetadata(mPath+mFilename);
    String dbxFileRev = metadata.getRev();

    If the file is not found, it'll throw a 'FileNotFoundException'

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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!