Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
SauravAnand
8 years agoExplorer | Level 4
Issue with ListFolderAsync()
Hello,
I'm using ListFolderAsync() to fetch all albums of Dropbox authorized account in my application and its returning too but the issue is when I'm using:
var list = await dbclient.Files.ListFolderAsync(path, true);
then i'm getting 20 albums with names etc. But when I'm using:
var list = await dbclient.Files.ListFolderAsync(path, true);
while (list.HasMore)
{
list = await dbclient.Files.ListFolderContinueAsync(list.Cursor);
}
then i'm getting 10 different albums with different names etc.
Why i'm getting different-different albums from above both methods?
Any help would be appreciated.
Thanks in advance.
The ListFolder/ListFolderContinue functionality is paginated, meaning that each call to ListFolder or ListFolderContinue will only contain a portion of the overall results.
In your second piece of code, you're overwriting the `list` variable with each call to ListFolderContinue without reading what it contained from the previous call. To get everything, you'll need to read out/save the list.Entries from each call.
2 Replies
Replies have been turned off for this discussion
- Greg-DB8 years ago
Dropbox Community Moderator
The ListFolder/ListFolderContinue functionality is paginated, meaning that each call to ListFolder or ListFolderContinue will only contain a portion of the overall results.
In your second piece of code, you're overwriting the `list` variable with each call to ListFolderContinue without reading what it contained from the previous call. To get everything, you'll need to read out/save the list.Entries from each call.
- SauravAnand8 years agoExplorer | Level 4
Hi Greg,
Thank you very much for all your hep & support. I'm able to get all the albums now and its working fine. As you said i didn't save my prev entries before query to ListFolderContinue.
Thank you.
About 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!