Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

neunygph's avatar
neunygph
Explorer | Level 4
9 years ago
Solved

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
    9 years ago
    Yes, if there have been any changes to the file, the rev will be different.

4 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    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
    9 years ago
    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 Community Moderator rankDropbox Community Moderator
    9 years ago
    Yes, if there have been any changes to the file, the rev will be different.

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!