I try to upload a file in symfony form, but i get this error :Notice: Undefined index: file which mean it didn't recover the file.

My form : 

```
<?php
namespace Polytech\SkillsBundle\Form\Rapport;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;

class FicheOccasionType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('ues', EntityType::class,
                array(
                    'class' => 'Polytech\SkillsBundle\Entity\UE',
                    'attr' => array('class' => 'browser-default ue'),
                    'choice_label' => 'nom',
                    'label' => false,
                    'required' => false,
                    'placeholder' => 'Choisissez une UE'
                )
            )
            ->add('etudiants', EntityType::class,
                array(
                    'class' => 'Polytech\SkillsBundle\Entity\Utilisateur',
                    'attr' => array('class' => 'browser-default etudiants'),
                    'choice_label' => 'nom',
                    'label' => false,
                    'required' => false,
                    'placeholder' => 'Choisissez un utilisateur'
                )
            )
            ->add('file', FileType::class, array('label' => 'PDF File'))
            ->add('submit', HiddenType::class)
            ->add('export', ButtonType::class, array('label' => 'Exporter'))
            ->add('import', ButtonType::class, array('label' => 'Import'));

    }

    public function getName()
    {
        return 'fiche_occasion';
    }
}

```

and this is my controller (the important part ) :

```
 if($form->isSubmitted() && $form->isValid() ) {
        $data = $request->request->get('fiche_occasion');
        $use = $data['ues'];
        $etudiants = $data['etudiants'];
        $file = $data['file'];
        $filename = md5(uniqid()).'.'.$file->guessExtension();
        $action = $data['submit'];

```

How I can retrieve the file information for the purpose of storing it in the web and storing its path in the database