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

Forum Discussion

pparkar's avatar
pparkar
Helpful | Level 5
5 years ago
Solved

get_thumbnail_v2 returning invalid thumbnail

We are using 'https://content.dropboxapi.com/2/files/get_thumbnail_v2' api to fetch thumbnails of varying size  'w128h128' and 'w1024h768' . However we receive the thumbnail of size 128x128 in both the cases.

 

Please the request/response attached. The only thing varying in the response header is ,

1. 128x128 has following response header,

Vary: Dropbox-API-Arg, Authorization

2. 1024x768 has the following in response header,

Vary: Dropbox-API-Arg, Authorization, Accept-Encoding

 

This is something that dropbox controls, because of which we get a cached thumbnail not respecting the size request in the 'Dropbox-API-Arg' . 

 

Can someone please provide more insight on how to fix this?Is there anything in the API request that can be set so we get the appropriate thumbnail?  Also, we see this behavior on certain images, so its not consistent across different images [one such image is attached]

 request-1response-1request-2response-2

2 Replies

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

    Thanks for sharing this! It looks like this is due to how we set the "Etag" value on these responses, causing the browser to cache the result. We'll look into it, but in the meantime, the easiest way to work around this client-side may be to use a POST instead of a GET, as that should avoid the caching anyway.

  • pparkar's avatar
    pparkar
    Helpful | Level 5
    5 years ago

    Thanks Greg-DB! Using post works for us.

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!