If you face “Argument 1 passed to App\Service\FileUploader::upload() must be an instance of Symfony\Component\HttpFoundation\File\UploadedFile, string given, ” this error while playing with files in Symfony 4. Then you need to change your file field in controller as. Change your code from to . Where task_logo is the name of the file field of your form. […]
Two things keep in mind 1) Form action could be defined as 2) Do not forget to add form_key else you would be going to waste your several hours on finding the dashboard redirection issue on form submission.