You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

pramodkr200's avatar
pramodkr200
New member | Level 2
12 months ago

Not able to fetch all files and folder

I have 40 files and folder in root folder, but I am getting only 25 from them.
I am using my app in 3 - 4 devices. Is any limitation from dropbox to access the all files and folder.

  • Mark's avatar
    Mark
    Icon for Super User II rankSuper User II

    No there isnt at all BUT there can be restrictions based upon characters depending upon the OS. 

     

    Can you see all of the files at www.dropbox.com/home ?

    • pramodkr200's avatar
      pramodkr200
      New member | Level 2


      yes I can see all files and folder on web to follow this link www.dropbox.com/home.
      But I am using this code that not response all files and folder.

          DbxClientV2 mDbxClient = new DbxClientV2(DbxRequestConfigFactory.getRequestConfig(), accessToken);
      try {
      ListFolderResult listFolderResult= mDbxClient.files().listFolder("");

      for (Metadata metadata : listFolderResult.getEntries()) {
      String fileName = metadata.getName();
      Log.i("Fetch File", "file: " + fileName);
      }
      } catch (DbxException e) {
      e.printStackTrace();
      }

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

        [Cross-linking for reference: https://github.com/dropbox/dropbox-sdk-java/issues/520 ]

         

        pramodkr200 I understand that you are attempting to list all files/folders using listFolder. Note that this functionality is paginated and you are not guaranteed to get all of the results back in a single listFolder call, so make sure you implement support for listFolderContinue as well.

        There are a few factors that can affect what/how much is returned in a single call, and that can vary over time due to a number of factors, e.g., as the state and contents of the account changes, etc, so you need to make sure you always have that implemented as documented.

        Refer to the listFolder and listFolderContinue documentation for information on doing so.