cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to display thumbnails in React Native?

How to display thumbnails in React Native?

wahaj-47
Explorer | Level 3

The endpoint 

/2/files/get_thumbnail_v2

returns application/octet. I have tried encoding it as base64 string but can't get it to display on react native application. 

4 Replies 4

Greg-DB
Dropbox Staff

It sounds like you have the Dropbox side of this working, in that you're getting the 'application/octet-stream' result back from /2/files/get_thumbnail_v2 as expected. We can't provide support for using React Native though, as that's not made by Dropbox. Perhaps another developer here on the forum happens to have some code to share for this. Otherwise you'll need to refer to the documentation or support resources for that for information on using it, such as for displaying arbitrary image data like this.

wahaj-47
Explorer | Level 3

I know I can display base64 in react native. But I am not sure if I am getting the right stream in the api response.


Greg-DB
Dropbox Staff

Can you clarify what you mean when you say you are "not sure if I am getting the right stream in the api response"? From your original description, it sounds like you are getting data back from the Dropbox API. That data would be the thumbnail image content for the requested image file. You may want to save that as an image file locally and open it in an image viewer to verify that it is working and returning that thumbnail image content as expected first.

wahaj-47
Explorer | Level 3

I switched to using fetch instead of axios and then converted the bodyBlob to base64 which I am now able to display on the app.  

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    wahaj-47 Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?