title: Cannot get file contents on UploadedFile Symfony
body: <p>I have the following function definition:</p>
  
  <pre><code>public function save(UploadedFile $file, string $fileSystemName)
  {
      $fs = $this-&gt;fileSystemMap-&gt;get($fileSystemName);
  
      $contents = file_get_contents($file-&gt;getRealPath());
      $filename = sprintf('%s/%s/%s/%s.%s', date('Y'), date('m'), date('d'), uniqid(), $file-&gt;getClientOriginalExtension());
  
      $fs-&gt;write($fileName, $contents);
  }
  </code></pre>
  
  <p>When the code runs:</p>
  
  <blockquote>
    <p>file_get_contents($file->getRealPath());</p>
  </blockquote>
  
  <p>It throws an error saying:</p>
  
  <blockquote>
    <p>Warning: file_get_contents(/tmp/phpM9Ckmq): failed to open stream: No such file or directory</p>
  </blockquote>
  
  <p>Note that I also tried to use $file->getPathName(), but the result is just the same.</p>
  
  <p>Why is this happening?</p>
  
  <p>Thanks!</p>