title: symfony edit form with file
body: <p>I have a problem with the file widget of my edit form.</p>
  <p>In <a href="http://symfony.com/doc/current/controller/upload_file.html" rel="nofollow noreferrer">the Symfony documentation</a>, at the end of the first paragraph, it says :</p>
  <blockquote>
  <p>When creating a form to edit an already persisted item, the file form
  type still expects a File instance. As the persisted entity now
  contains only the relative file path, you first have to concatenate
  the configured upload path with the stored filename and create a new File class:</p>
  <pre><code>use Symfony\Component\HttpFoundation\File\File;
  
  // ...
  
  $product-&gt;setBrochure(
      new File($this-&gt;getParameter('brochures_directory').'/'.$product-&gt;getBrochure())
  );
  </code></pre>
  </blockquote>
  <p>However, even if I apply this on my form, my file widget still show &quot;no file chosen&quot; (if my translation is ok).
  Moreover, since the total form must have a file attached, the user have to attach the file again.</p>
  <p>How can I manage to show that a file is already uploaded, and give only the opportunity to update the file with another ?</p>
  <p>EDIT : related SO post : <a href="https://stackoverflow.com/questions/11373551/non-blank-file-input-field-in-symfony2-form">Non blank file input field in Symfony2 form</a></p>