Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I am trying to list all files in the folder using searchBuilder, when I passing the multiple extensions passing in Query which results Zero values.
For Eg:
String query = ".pdf";
Long max = 100L;
Long stat = 0L;
SearchResult sresult;
SearchMode mode = SearchMode.FILENAME;
sresult = DropboxClient.getClient().files().searchBuilder(path, query).withMode(mode).withMaxResults(max).withStart(stat).start();
java.util.List<SearchMatch> res = sresult.getMatches();
Above code works fine for me, But i trying to multiple extensions ".pdf .jpg" it will not works.
Is any possible way to search all files with any maxmium limit?
The search functionality doesn't support searching for files with one or more of the search terms. It works by searching for all of them. We'll consider this a feature request.
Instead, you should either make multiple search calls, one per file type, or use listFolder and listFolderContinue to list all files in a given folder, and filter them as desired.
Thanks Greg for the QuickReply. Currently i am using ListFolder and it will take some if the folder has 10000 files or more. What i am trying to do is to load limited files for better UI experiences for eg: 100 and another set of 100 files only when user demands. Is any options for listing files with limit in ListFolder API?
Thanks Greg for your support.
You can now set an approximate limit on the listFolder page size by using ListFolderBuilder.withLimit.
Hi there!
If you need more help you can view your support options (expected response time for a 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!