[Solved] How to upload file using ajax/jQuery with Symfony2
Firstly, I notice that your click event for #upload_image fires a click trigger on #bundle_user_file, but below that you are asking it to look for a change event. Therefore, this would do nothing. You can re-generate a CSRF token if you want by calling the csrf token_manager service by doing this: /** @var \Symfony\Component\Security\Csrf\CsrfTokenManagerInterface $csrf … Read more