Skip to content

Commit 9497189

Browse files
Minor change
"upload" was the wrong term, since an upload is initiated by the end-user, not by Symfony. Question: Is a Doctrine Listener preferred over a view transformer? 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.
1 parent 1b8aacb commit 9497189

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Using a Doctrine Listener
315315

316316
If you are using Doctrine to store the Product entity, you can create a
317317
:doc:`Doctrine listener </doctrine/event_listeners_subscribers>` to
318-
automatically upload the file when persisting the entity::
318+
automatically move the file when persisting the entity::
319319

320320
// src/AppBundle/EventListener/BrochureUploadListener.php
321321
namespace AppBundle\EventListener;

0 commit comments

Comments
 (0)