title: How to get file upload without a form
body: <p>my controller receives post data. It's not from a Symfony generated form, but from an AngularJS custom form using <code>FormData</code>.</p>
  
  <p>The normal parameters are received normally in the request parameter bag, but how do I get the file that is uploaded? Do I need to manually do the same that the form's <code>handleRequest</code> does?</p>
  
  <p>My document is the same as the <a href="http://symfony.com/doc/master/cookbook/doctrine/file_uploads.html">cookbook article</a>.</p>
  
  <p>So I need to get an UploadFile from the post request to call this method on the document entity:</p>
  
  <p><code>public function setFile(UploadedFile $file = null)</code></p>
  
  <p>How do I receive a upload manually in Symfony 2 (without using the form builder in any way)?</p>