listFiles( )
Gets a list of files from the Media Manager by parentFolderId
(or root).
The listFiles()
function returns a Promise that resolves to information about
the files in the folder.
To get a list of files within a specific folder in the Media Manager, pass the folder's ID in the parentFolderId
parameter. If no folder is specified, the listFiles()
function returns the list of files in the root folder of the Media Manager.
Notes:
-
This function's parameters are positional, and must be specified in the sequence shown in the syntax below. When specifying a parameter, use
null
as a placeholder for any unspecified parameters. For example, to specifyparentFolderId
only, calllistFiles(filters, null, null)
. For example, to specifysorting
only, calllistFiles(null, sorting, null)
. -
The
listFiles()
function only gets a list of files with supported media types, and that are explicitly listed in the Media Manager. Files with unsupported media types such as 'model', and files that aren't explicitly listed in the Media Manager such as default files in a gallery component, aren't listed when calling thelistFiles()
function. The supported media types are listed in the description for themediaType
return in thegetFileInfo()
function.
File filter options.
Sorting options.
Paging options.