Skip to content

Commit 22c9a68

Browse files
committed
Fix getFileMultiple() usage
1 parent b3f7130 commit 22c9a68

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

user_guide_src/source/incoming/incomingrequest.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,10 @@ You can retrieve a single file uploaded on its own, based on the filename given
257257

258258
$file = $request->getFile('uploadedfile');
259259

260-
You can retrieve a single file uploaded as part of multiple ones, based on the filename given in the HTML file input::
260+
You can retrieve an array of same-named files uploaded as part of a
261+
multi-file upload, based on the filename given in the HTML file input::
261262

262-
$file = $request->getFileMultiple('uploadedfile');
263+
$files = $request->getFileMultiple('uploadedfile');
263264

264265
Content Negotiation
265266
----------------------------------------------------------------------------

user_guide_src/source/libraries/uploaded_files.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,9 @@ In controller::
126126
$file1 = $this->request->getFile('images.0');
127127
$file2 = $this->request->getFile('images.1');
128128

129-
You can access individual files uploaded at the same time, but with different names,
130-
using ``getFileMultiple()``::
129+
You might find it easier to use ``getFileMultiple()``, to get an array of uploaded files with the same name::
131130

132-
$file1 = $this->request->getFileMultiple('somefile');
133-
$file2 = $this->request->getFileMultiple('adifferentfile');
131+
$files = $this->request->getFileMultiple('images');
134132

135133

136134
Another example::

user_guide_src/source/libraries/validation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ this code and save it to your **app/Controllers/** folder::
131131
if (! $this->validate([]))
132132
{
133133
echo view('Signup', [
134-
'validation' => $this->validation
134+
'validation' => $this->validator
135135
]);
136136
}
137137
else

0 commit comments

Comments
 (0)