0

I have used "/revisions" to get the all version of file.But I am not getting actual versions of file by sequentially. (getting it randomly like 1,4,11,15)

Please see the below response of file containing 2 version.

For this I expecting 1,2

[
    {
        "revision": 4,
        "rev": "40000000d",
        "thumb_exists": false,
        "bytes": 0,
        "modified": "Wed, 20 Jul 2011 22:41:09 +0000",
        "path": "/hi2",
        "is_dir": false,
        "icon": "page_white",
        "root": "app_folder",
        "mime_type": "application/octet-stream",
        "size": "0 bytes"
    },
    {
        "revision": 1,
        "rev": "10000000d",
        "thumb_exists": false,
        "bytes": 3,
        "modified": "Wed, 20 Jul 2011 22:40:43 +0000",
        "path": "/hi2",
        "is_dir": false,
        "icon": "page_white",
        "root": "app_folder",
        "mime_type": "application/octet-stream",
        "size": "3 bytes"
    }
]

Here is my sample code:

 OAuthUtility.GetAsync
 (
 "https://api.dropboxapi.com/1/revisions/auto/",
       new HttpParameterCollection
       {
       { "path", CurrentPath },
       { "access_token",accessToken },
       { "rev_limit", 1000 }
      },
 callback: GetFilesRevisions_Results
 );

Can you please help me ? Thanks in advance!

1

1 Answer 1

1

The revision field is deprecated and shouldn't be used. You should use the rev field instead. The rev is not a number and should be treated as opaque.

When you call /revisions, you get the revisions in reverse chronological order, so the first one is the most recent revision.

6
  • Yes Thanks!.But you mean there is no any way to get actual version number? @smarx Commented Dec 23, 2015 at 5:12
  • I don't know what you mean by "version number." Files in Dropbox have revisions, and you can get them via the rev field. They're not numbers.
    – user94559
    Commented Dec 23, 2015 at 6:04
  • Yes right "Files in Dropbox have revisions, and you can get them via the rev field."..But I want to get actual file revision number instead of "rev" or "revision" in reverse chronological order.Example Version(Revision) number = 1,2,3,....... Commented Dec 23, 2015 at 6:27
  • I don't know what you mean by "actual file revision number." I think at this point you understand what is available from Dropbox. If you want to turn that into something else (e.g. call the first revision "1" and the next one "2"), you can do that yourself.
    – user94559
    Commented Dec 23, 2015 at 6:30
  • "actual file revision number." mean the version number of file which we can see on UI. Commented Dec 23, 2015 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.