8000 File example update · symfony/symfony-docs@e7fb1a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit e7fb1a1

Browse files
runawaycoinxabbuh
authored andcommitted
File example update
1 parent 33bf1ac commit e7fb1a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reference/forms/types/file.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ be used to move the ``attachment`` file to a permanent location::
5050
if ($form->isSubmitted() && $form->isValid()) {
5151
$someNewFilename = ...
5252

53-
$form['attachment']->getData()->move($dir, $someNewFilename);
53+
$file = $form['attachment']->getData();
54+
$file->move($dir, $someNewFilename);
5455

5556
// ...
5657
}

0 commit comments

Comments
 (0)
0