title: Symfony 2 upload file simple form
body: <p>Hello I want simple upload no database for now.</p>
  
  <p>Inside of controller:</p>
  
  <pre><code>public function UploadAction(Request $request)
  {
  
      $form = $this-&gt;createFormBuilder( array('csrf_protection' =&gt; false))
          -&gt;add('file', 'file')
          -&gt;add('Send', 'submit')
          -&gt;getForm();
  
      if ($form-&gt;isValid()) {
          $extension = $file-&gt;guessExtension();
          if (!$extension) {
              // extension cannot be guessed
              $extension = 'bin';
          }
          $file-&gt;move('blah', rand(1, 99999).'.'.$extension);
      }
  
      return $this-&gt;render(
          'FelekFosBundle:Plik:Upload.html.twig',
          array(
              'form' =&gt; $form-&gt;createView(),
          )
      );
  
  }
  </code></pre>
  
  <p>Also I want to disable <code>csrf_protection</code> still code used seems not working.</p>
  
  <p>Form is rendering well except <code>csrf_protection</code>. Still it's not preform any upload action. And I get errors. </p>
  
  <blockquote>
    <p>csrf_message The CSRF token is invalid. Please try to resubmit the
    form.</p>
  </blockquote>