-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed" when submitting form with file #101
Comments
Hi, What's the configuration of the form that causes this to happen? |
This is my current configuration, no configuration changes that have I made did anything, I'm using bolt 4.1.15 with symfony 5.2.5 |
Is there any way this can be fixed? The problem lies in serializing the whole form context in the mail factory when files should be omitted since they can't be serialized. I could make a PR which will fix the issue. Actually, I did fix the issue myself but since MailFactory class is not injected I can't override it. |
The real fix is on the Symfony side, as far as I can see. What fixed the error for me was only running the profiler for requests with exceptions, by setting There'd have to be a fix within the Symfony profiler itself for this to be fully solved, I'm afraid. Relevant issue here. |
Hi,
I get this error when trying to submit form with a file:
"Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed"
From what I found unsetting file fields on
EmailFactory
level from form data passed to context ( files are preserved in attachements ) works fineStacktrace:
The text was updated successfully, but these errors were encountered: