@@ -156,14 +156,14 @@ There are some important things to consider in the code of the above controller:
156156 provides methods for the most common operations when dealing with uploaded files.
157157#. A well-known security best practice is to never trust the input provided by
158158 users. This also applies to the files uploaded by your visitors. The ``Uploaded ``
159- class provides methods to get the original file extension (:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::getExtension() `),
160- the original file size (:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::getSize() `)
161- and the original file name (:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::getClientOriginalName() `).
159+ class provides methods to get the original file extension (:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::getExtension `),
160+ the original file size (:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::getSize `)
161+ and the original file name (:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::getClientOriginalName `).
162162 However, they are considered *not safe * because a malicious user could tamper
163163 that information. That's why it's always better to generate a unique name and
164- use the:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::guessExtension() `
164+ use the:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::guessExtension `
165165 method to let Symfony guess the right extension according to the file MIME type.
166- #. The ``UploadedFile `` class also provides a:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::move() `
166+ #. The ``UploadedFile `` class also provides a:method: `Symfony\\ Component\\ HttpFoundation\\ File\\ UploadedFile::move `
167167 method to store the file in its intended directory. Defining this directory
168168 path as an application configuration option is considered a good practice that
169169 simplifies the code: ``$this->container->getParameter('brochures_dir') ``.
@@ -172,6 +172,6 @@ You can now use the following code to link to the PDF brochure of an product:
172172
173173..code-block ::html+jinja
174174
175- <a href="{{ asset('uploads/brochures' ~ product.brochure) }}">View brochure (PDF)</a>
175+ <a href="{{ asset('uploads/brochures/ ' ~ product.brochure) }}">View brochure (PDF)</a>
176176
177177.. _`VichUploaderBundle` :https://github.com/dustin10/VichUploaderBundle