Moodle Version: 3.7.1
So my code to save the file that was uploaded using the file manager form element follows the documentation.
Form Definition for this Element
$mform->addElement('filemanager', 'thumbnailfile', get_string('video_thumbnail', 'mod_ovivideogallery'), null,
array('accepted_types' => array('.png','.jpg'), 'return_types'=> FILE_INTERNAL | FILE_EXTERNAL));
file_save_draft_area_files($data->thumbnailfile, $systemcontext->id, 'mod_mycomponent',
'thumbnailfile', $data->id, array('maxfiles' => 1));
Or is there a different way of doing it that I'm not seeing. I can't find anything in the documentation or in other modules.