Closed
Description
Is a Doctrine Listener preferred over a view transformer to switch between the File
instance and the string? I'm wondering, since the error message recommends a view transformer:
The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is a(n) string. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) string to an instance of Symfony\Component\HttpFoundation\File\File.
...whereas on https://symfony.com/doc/current/controller/upload_file.html a view transformer isn't even mentioned.
Metadata
Metadata
Assignees
Labels
No labels