title: Symfony4 (API) - Trying to upload a file using request->files->all() gives me an empty result
body: <p>I'm trying to upload a file using API in symfony 4, i'm using RESTLET tool to send my file  but all i got is a 200 OK but with an empty result.</p>
  
  <p>Content-Type : text/plain</p>
  
  <p>METHOD : POST</p>
  
  <p>FILE SIZE : 1ko</p>
  
  <p>Code :</p>
  
  <pre><code>&lt;?php
  namespace App\Controller\Api\Dossier;
  
  use App\Entity\Dossier\Fichier;
  use App\Helpers\Constant\ErrorMessage;
  use Symfony\Component\HttpFoundation\JsonResponse;
  use Symfony\Component\HttpFoundation\RedirectResponse;
  use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\Routing\Annotation\Route;
  
  /**
   * @Route("/{db}/fichier")
   */
  class ApiFichierController extends ApiController
  {
  /**
   * @Route("/", name="api_fichier_enregistrer", methods={"POST"})
   * @param Request $request
   * @return JsonResponse|RedirectResponse
   */
  public function retrieveAction(Request $request){
      // retrieve the file with the name given in the form.
  
      $filesResult = array();
      $filesBag = $request-&gt;files-&gt;all();
  
      foreach ($filesBag as $file){
          $filename = $file-&gt;getClientOriginalName();
          $filesResult []=  array(
              'path' =&gt; $file-&gt;getPathname(),
              'url'  =&gt; 'ddd'
          );
          $src    =  __DIR__;
          $file-&gt;move( $src ,$filename );
  
      }
      return new JsonResponse($filesBag);
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/c068V.png" rel="nofollow noreferrer">Result</a></p>