Symfony 2.2 upload files
问题 It's been a while since I uploaded files with Symfony2 and it seems that everything has changed, follow the guide in How to handle File Uploads with Doctrine but is outdated and dont work. when i try to bind the form a get a error Catchable Fatal Error: Argument 1 passed to Entity\Portada::setFile() must be an instance of Symfony\Component\HttpFoundation\File\UploadedFile, string given, ... this is my controller /** * @Route("/upload", name="documento_upload") * @Method("POST") * @Template()