Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!

Forum Discussion

pparkar's avatar
pparkar
Helpful | Level 5
4 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

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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

      Thanks Greg-DB! Using post works for us.