When you create the form, and add the filemanager element, you can set options:
https://github.com/moodle/moodle/blob/fd840ab59cd990738fcb692a515ee41838655d5e/user/edit.php#L165
https://github.com/moodle/moodle/blob/fd840ab59cd990738fcb692a515ee41838655d5e/user/editlib.php#L368
https://github.com/moodle/moodle/blob/fd840ab59cd990738fcb692a515ee41838655d5e/user/edit.php#L165
https://github.com/moodle/moodle/blob/fd840ab59cd990738fcb692a515ee41838655d5e/user/editlib.php#L368