Skip to main content

How get files for specific folder (without files in subfolders)?

Comments

5 comments

  • Ido

    Hi

     

    It's possible to list resources based on a specific prefix using our admin API.

    That prefix can be a path of folders consisting of subfolders, so you could list only a specific subfolder.

    You could do that by performing a call and list the subfolder in the `prefix` parameter

    1
  • Dmitry Vashkevich

    Hi!
    I have folders and files in they.
    When I try get files for root folder only - I retrieve files from root folder and all files from subfolders. But they are excess.
    As I see, in admin console you get all files and then filter it. But what to do when files are millions?

    0
  • Brian Luk

    Hi Dmitry,

    You can also use our Search API to search for resources by folder using the expression `folder="<folder_name>"`. For the root folder, the expression would be `folder=""`.

    -1
  • Dmitry Vashkevich

    Hi Brian!

    It works as it should.

    Thank you!!

    0
  • Ido

    Thanks for the update.

     

    Glad we could help out :)

    0

Post is closed for comments.