8000 Merge branch '2.7' into 2.8 · symfony/symfony-docs@b01d242 · GitHub
[go: up one dir, main page]

Skip to content

Commit b01d242

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [BrowserKit] Add snippet: how to upload a file
2 parents 5d7fa56 + b749bf0 commit b01d242

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/browser_kit.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ method (which makes the needed HTTP POST request to submit the form contents)::
109109
$form['login'] = 'symfonyfan';
110110
$form['password'] = 'anypass';
111111

112+
// To upload a file, the value should be the absolute file path
113+
$form['file'] = __FILE__;
114+
112115
// submit that form
113116
$crawler = $client->submit($form);
114117

0 commit comments

Comments
 (0)
0