Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7fb1a1

Browse filesBrowse files
runawaycoinxabbuh
authored andcommitted
File example update
1 parent 33bf1ac commit e7fb1a1
Copy full SHA for e7fb1a1

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎reference/forms/types/file.rst

Copy file name to clipboardExpand all lines: reference/forms/types/file.rst
+2-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.