I have the following custom submit handler.

```
function example_form_submit(&$form, FormStateInterface $form_state) {
    $file = file_load($form_state['values']['file_fid']);//This works in 7
}

```

Now I want to have uploaded file information like fid, name etc. in D8. I am not able to get that.

**UPDATE:**
I have also tried using the following code from [here](https://www.drupal.org/node/2858626) but no luck.

```
if ($form_state->hasFileElement())
{
  drupal_set_message("This form has a file element.");
  $video_file_file_array = $form_state->getValue('video_file');
  if (is_array($video_file_file_array))
  {
    if (isset($video_file_file_array[0]))
    {
      $video_file_file_id = $video_file_file_array[0];
      $file = \Drupal\file\Entity\File::load($video_file_file_id);
      if ($file != NULL)
      {
        $filename = $file->getFilename();
        drupal_set_message('Filename: ' . $filename);
      }
    }
  }
}

```