We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12ed2e6 commit 69475d0Copy full SHA for 69475d0
cookbook/doctrine/file_uploads.rst
@@ -99,6 +99,13 @@ file.
99
If you're using annotations to specify your validation rules (as shown
100
in this example), be sure that you've enabled validation by annotation
101
(see :ref:`validation configuration <book-validation-configuration>`).
102
+
103
+.. caution::
104
105
+ If you use the getUploadRootDir() method, be aware that this will save
106
+ the file inside the document root, which can be accessed by everyone.
107
+ Consider placing it out of the document root and adding custom viewing
108
+ logic when you need to secure the files.
109
110
To handle the actual file upload in the form, use a "virtual" ``file`` field.
111
For example, if you're building your form directly in a controller, it might
0 commit comments