How to get the file ID using managed_file on custom form?
I think you need to save the file :
public function submitForm(array &amp;$form, FormStateInterface $form_state) {
  $event_image = $form_state-&gt;getValue('event_image');
  if ($event_image) {
    $file = File::load(reset($event_image));
    $file-&gt;setPermanent();
    $file-&gt;save();
    drupal_set_message('Filename: ' . $file-&gt;getFilename());
  }
}