title: Symfony 3 can't move uploaded file
body: <p>I just start to learn Symfony 3 and I make a blog. 
  I use Doctrine Entities to interact with the database. I'm on Xampp on Mac OS.</p>
  
  <p>I created a form with a file input but when I want to upload the file it never moves where it should and in the database I record the path of the temp folder of Xampp.</p>
  
  <p><strong>Here's the part of code in the Entity file :</strong></p>
  
  <pre><code>public function getFile()
  {
    return $this-&gt;file;
  }
  
  public function setFile(UploadedFile $file = null)
  {
    $this-&gt;file = $file;
  }
  
  public function upload(){
    if(null === $this-&gt;file){
      return;
    }
    $name = $this-&gt;file-&gt;getClientOriginalName();
  
    $this-&gt;file-&gt;move($this-&gt;getUploadRootDir(), $name);
    $this-&gt;image = $name;
  }
  
  public function getUploadDir(){
    return 'uploads/img';
  }
  
  public function getUploadRootDir(){
    return '/../../../../web/'.$this-&gt;getUploadDir();
  }
  </code></pre>
  
  <p><strong>That's my form builder :</strong></p>
  
  <pre><code>class BlogType extends AbstractType
  {
      /**
       * @param FormBuilderInterface $builder
       * @param array $options
       */
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('image', FileType::class)
              -&gt;add('categorie', TextType::class)
              -&gt;add('photographe', TextType::class)
              -&gt;add('save', SubmitType::class)
          ;
      }
  
      /**
       * @param OptionsResolver $resolver
       */
      public function configureOptions(OptionsResolver $resolver)
      {
          $resolver-&gt;setDefaults(array(
              'data_class' =&gt; 'Boreales\PlatformBundle\Entity\Blog'
          ));
      }
  }
  </code></pre>
  
  <p><strong>And the addAction from the controller :</strong></p>
  
  <pre><code>public function addAction(Request $request)
  {
    //Création de l'entité
    $photo = new Blog();
    $form = $this-&gt;get('form.factory')-&gt;create(BlogType::class, $photo);
  
    if($request-&gt;isMethod('POST') &amp;&amp; $form-&gt;handleRequest($request)-&gt;isValid()){
      $photo-&gt;upload();
  
  
      $em = $this-&gt;getDoctrine()-&gt;getManager();
      $em-&gt;persist($photo);
      $em-&gt;flush();
  
      $request-&gt;getSession()-&gt;getFlashBag()-&gt;add('notice', 'Photo enregistrée.');
      var_dump($photo-&gt;getImage());
      //return new Response('Coucou');
      //return $this-&gt;redirectToRoute('galerie');
    }
    return $this-&gt;render('BorealesPlatformBundle:Blog:add.html.twig', array(
      'form' =&gt; $form-&gt;createView()
    ));
  }
  </code></pre>
  
  <p>Can someone see where's the problem ?</p>