Skip to content

Commit 28e84c5

Browse files
committed
[reference][forms] Tweaking
1 parent 3ec7323 commit 28e84c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reference/forms/types/file.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Let's say you have this form definition:
3030
Don't forget to add the ``enctype`` attribute in the form tag: ``<form
3131
action="#" method="post" {{ form_enctype(form) }}>``.
3232

33-
When the form is submitted, the document element will be an instance of
33+
When the form is submitted, the ``attachment`` field will be an instance of
3434
:class:`Symfony\\Component\\HttpFoundation\\File\\UploadedFile`. It can be
35-
used to move the `attachment` file to a permanent location:
35+
used to move the ``attachment`` file to a permanent location:
3636

3737
.. code-block:: php
3838
@@ -51,7 +51,7 @@ used to move the `attachment` file to a permanent location:
5151
// ...
5252
}
5353
54-
The ``move()`` method takes a directory and a file name as arguments::
54+
The ``move()`` method takes a directory and a file name as its arguments::
5555

5656
// use the original file name
5757
$file->move($dir, $this->getOriginalName());
@@ -64,7 +64,7 @@ The ``move()`` method takes a directory and a file name as arguments::
6464
}
6565
$file->move($dir, rand(1, 99999).'.'.$extension);
6666

67-
Using the original name via ``getOriginalName()`` is not safe as it can have
67+
Using the original name via ``getOriginalName()`` is not safe as it could have
6868
been manipulated by the end-user. Moreover, it can contain characters that are
6969
not allowed in file names. You should sanitize the name before using it
7070
directly.

0 commit comments

Comments
 (0)