We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.

Forum Discussion

Ashish_Bijlwan's avatar
Ashish_Bijlwan
Explorer | Level 4
4 years ago

Pagination in dropbox

Hi,

In dropbox, under an "image" folder we have 100 images and those images we are retrieving from the dropbox and showing in the app using dropbox API. The concern here is that it is taking a lot of time to display those images in the app because dropbox is providing all the images at once and I am unable to find any pagination concept with the dropbox API.

Is there any solution to load the images in a group of 5  i.e we will get the first 5 images then the next 5 images and so on...

 

 

Thanks and Regards

Ashish

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

    Can you clarify what you mean when you say "dropbox is providing all the images at once"? For instance, what method(s) are you using?

     

    For example, to list the contents of a folder, you would use the /2/files/list_folder and /2/files/list_folder/continue endpoints, which are paginated by design. You can also set an approximate maximum number of entries to return per page by setting the 'limit' parameter when calling /2/files/list_folder. Check out the linked documentation for more information on that.

     

    Or, when using endpoints to retrieve the actual data of specific files, such as /2/files/download or /2/files/get_thumbnail_v2, the app controls how many calls to make and when, so that's under your control.

     

    By the way, those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints. If you are using one of those, refer to the relevant SDK documentation for the corresponding documentation for the above HTTPS endpoints.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,875 PostsLatest Activity: 2 months ago
325 Following

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 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!