Skip to content

Commit 0672892

Browse files
committed
Revert the html tag and remove the comment out.
1 parent ac2f64f commit 0672892

2 files changed

Lines changed: 10 additions & 19 deletions

File tree

user_guide_src/source/libraries/uploaded_files.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ request, use ``getFiles()``. This will return an array of files represented by i
126126
Of course, there are multiple ways to name the file input, and anything but the simplest can create strange results.
127127
The array returns in a manner that you would expect. With the simplest usage, a single file might be submitted like::
128128

129-
<input type="file" name="avatar">
129+
<input type="file" name="avatar" />
130130

131131
Which would return a simple array like::
132132

@@ -138,7 +138,7 @@ Which would return a simple array like::
138138

139139
If you used an array notation for the name, the input would look something like::
140140

141-
<input type="file" name="my-form[details][avatar]">
141+
<input type="file" name="my-form[details][avatar]" />
142142

143143
The array returned by ``getFiles()`` would look more like this::
144144

@@ -153,8 +153,8 @@ The array returned by ``getFiles()`` would look more like this::
153153

154154
In some cases, you may specify an array of files to upload::
155155

156-
Upload an avatar: <input type="file" name="my-form[details][avatars][]">
157-
Upload an avatar: <input type="file" name="my-form[details][avatars][]">
156+
Upload an avatar: <input type="file" name="my-form[details][avatars][]" />
157+
Upload an avatar: <input type="file" name="my-form[details][avatars][]" />
158158

159159
In this case, the returned array of files would be more like::
160160

@@ -179,7 +179,7 @@ Simplest usage
179179

180180
With the simplest usage, a single file might be submitted like::
181181

182-
<input type="file" name="userfile">
182+
<input type="file" name="userfile" />
183183

184184
Which would return a simple file instance like:
185185

@@ -190,7 +190,7 @@ Array notation
190190

191191
If you used an array notation for the name, the input would look something like::
192192

193-
<input type="file" name="my-form[details][avatar]">
193+
<input type="file" name="my-form[details][avatar]" />
194194

195195
For get the file instance:
196196

@@ -201,7 +201,7 @@ Multiple files
201201

202202
::
203203

204-
<input type="file" name="images[]" multiple>
204+
<input type="file" name="images[]" multiple />
205205

206206
In controller:
207207

@@ -221,8 +221,8 @@ You might find it easier to use ``getFileMultiple()``, to get an array of upload
221221

222222
Another example::
223223

224-
Upload an avatar: <input type="file" name="my-form[details][avatars][]">
225-
Upload an avatar: <input type="file" name="my-form[details][avatars][]">
224+
Upload an avatar: <input type="file" name="my-form[details][avatars][]" />
225+
Upload an avatar: <input type="file" name="my-form[details][avatars][]" />
226226

227227
In controller:
228228

@@ -334,7 +334,7 @@ Each file can be moved to its new location with the aptly named ``store()`` meth
334334

335335
With the simplest usage, a single file might be submitted like::
336336

337-
<input type="file" name="userfile">
337+
<input type="file" name="userfile" />
338338

339339
By default, upload files are saved in **writable/uploads** directory. The **YYYYMMDD** folder
340340
and random file name will be created. Returns a file path:

user_guide_src/source/libraries/uploaded_files/002.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<?php
22

3-
/**
4-
* This file is part of CodeIgniter 4 framework.
5-
*
6-
* (c) CodeIgniter Foundation <admin@codeigniter.com>
7-
*
8-
* For the full copyright and license information, please view
9-
* the LICENSE file that was distributed with this source code.
10-
*/
11-
123
namespace App\Controllers;
134

145
use CodeIgniter\Files\File;

0 commit comments

Comments
 (0)