You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

neunygph's avatar
neunygph
Explorer | Level 4
8 years ago

Response headers

Hi,

 

With API v2, we can be able to access/retrieve response header from get_thumbnail request in order to retrieve "etag" and "dropbox-api-result". I just start using  Dropbox SDK from http://dropbox.github.io/dropbox-sdk-js/global.html#FilesThumbnailArg__anchor and I was trying to get the response header but look like there is no way for me to access response header from "DropBox.filesGetThumbnail()".

 

Just wonder if there is a way to do it with the SDK

 

Thanks,

  • Greg-DB's avatar
    Greg-DB
    8 years ago
    Yes, if there have been any changes to the file, the rev will be different.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The JavaScript SDK doesn't expose these directly. Instead, the information from the filesGetThumbnail response is translated into a JavaScript object for you. Likewise, the etag value is available as the "rev" metadata.

    • neunygph's avatar
      neunygph
      Explorer | Level 4
      Hello Greg,

      So that mean we can use the rev value as an etag to check if the file has been modified since the last request, is that correct ?
      Thanks,
      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        Yes, if there have been any changes to the file, the rev will be different.