@@ -30,9 +30,9 @@ Let's say you have this form definition:
30
30
Don't forget to add the ``enctype `` attribute in the form tag: ``<form
31
31
action="#" method="post" {{ form_enctype(form) }}> ``.
32
32
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
34
34
: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:
36
36
37
37
.. code-block :: php
38
38
@@ -51,7 +51,7 @@ used to move the `attachment` file to a permanent location:
51
51
// ...
52
52
}
53
53
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::
55
55
56
56
// use the original file name
57
57
$file->move($dir, $this->getOriginalName());
@@ -64,7 +64,7 @@ The ``move()`` method takes a directory and a file name as arguments::
64
64
}
65
65
$file->move($dir, rand(1, 99999).'.'.$extension);
66
66
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
68
68
been manipulated by the end-user. Moreover, it can contain characters that are
69
69
not allowed in file names. You should sanitize the name before using it
70
70
directly.
0 commit comments