Get Files in Admin panel


I would like to get a file list in a custom select field

i have placed a custom field with yaml:
type: select
style: vertical
label: Select File
classes: fancy
data-options@: ‘\Grav\Common\Page\Media::functionReturningFiles’

Hope someone can point me in the right direction.

Thx in advance.

This requires editing the Common\Page\Media class, and it’s not ideal.

Use the pagemediaselect or file fields instead.

Thanks, i totally missed that one :slight_smile: thx. @flaviocopes