We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
lrduques
6 years agoHelpful | Level 6
How to display thumbnails in it's original size with PHP
Hi! I am trying to display my Dropbox images on the browser using /get_thumbnail which works just fine. However, the image on the browser it's too small. It's not the original size. This is the p...
- 6 years ago
By default, the /2/files/get_thumbnail endpoint will return a 64x64 thumbnail of the requested image. If you want a different size, you can request it using the "size" parameter. You can specify that the same way you specify the "mode" and "format" parameters. You can find more information, such as the sizes that are available, in the /2/files/get_thumbnail:
https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail
Note that if you want the original file data though, you can instead use /2/files/download:
https://www.dropbox.com/developers/documentation/http/documentation#files-download
- 6 years ago
Problem solved!!
I read a little further the documentation I figured out that I was missing the paramenter size on my code.So I changed this line:
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $token[0]->itoken, 'Dropbox-API-Arg: {"path": "/test-1/Capture-desktop.PNG", "format": "png", "mode": "strict"}'));
For this one:
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $token[0]->itoken, 'Dropbox-API-Arg: {"path": "/test-1/Capture-desktop.PNG", "format": "png", "size": "w1024h768", "mode": "strict"}'));
The size options I found in this link: https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail
And now it's working perfectly!
Cheers!!
Greg-DB
6 years agoDropbox Staff
By default, the /2/files/get_thumbnail endpoint will return a 64x64 thumbnail of the requested image. If you want a different size, you can request it using the "size" parameter. You can specify that the same way you specify the "mode" and "format" parameters. You can find more information, such as the sizes that are available, in the /2/files/get_thumbnail:
https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail
Note that if you want the original file data though, you can instead use /2/files/download:
https://www.dropbox.com/developers/documentation/http/documentation#files-download
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 3 hours agoIf 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 or Facebook.
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!