@@ -30,7 +30,7 @@ Uploading a file involves the following general process:
30
30
uploaded based on the preferences you set.
31
31
- Once uploaded, the user will be shown a success message.
32
32
33
- To demonstrate this process here is brief tutorial. Afterward you'll
33
+ To demonstrate this process here is a brief tutorial. Afterward you'll
34
34
find reference information.
35
35
36
36
Creating the Upload Form
@@ -85,7 +85,7 @@ this code and save it to your **app/Controllers** directory:
85
85
86
86
Since the value of a file upload HTML field doesn't exist, and is stored in the
87
87
``$_FILES `` global, only :ref: `rules-for-file-uploads ` can be used to validate
88
- upload file with :doc: `validation `.
88
+ the upload file with :doc: `validation `.
89
89
90
90
The rule ``required `` cannot be used either, so if the file is required, use
91
91
the rule ``uploaded `` instead.
@@ -250,7 +250,7 @@ In controller:
250
250
Working with the File
251
251
*********************
252
252
253
- Once you've retrieved the UploadedFile instance, you can retrieve information about the file in safe ways, as well as
253
+ Once you've retrieved the UploadedFile instance, you can get information about the file in safe ways, as well as
254
254
move the file to a new location.
255
255
256
256
.. _verify-a-file :
@@ -315,7 +315,7 @@ Returns the original file extension, based on the file name that was uploaded:
315
315
getClientMimeType()
316
316
-------------------
317
317
318
- Returns the mime type (mime type) of the file as provided by the client. This is NOT a trusted value. For a trusted
318
+ Returns the mime type of the file as provided by the client. This is NOT a trusted value. For a trusted
319
319
version, use ``getMimeType() `` instead:
320
320
321
321
.. literalinclude :: uploaded_files/015.php
@@ -365,15 +365,15 @@ as the third parameter:
365
365
Check if the File Moved
366
366
-----------------------
367
367
368
- Once the file has been removed the temporary file is deleted. You can check if a file has been moved already with
368
+ Once the file has been moved the temporary file is deleted. You can check if a file has been moved already with
369
369
the ``hasMoved() `` method, which returns a boolean:
370
370
371
371
.. literalinclude :: uploaded_files/018.php
372
372
373
373
When Moving Fails
374
374
-----------------
375
375
376
- Moving an uploaded file can fail, with an HTTPException, under several circumstances:
376
+ Moving an uploaded file can fail, with an `` HTTPException `` , under several circumstances:
377
377
378
378
- the file has already been moved
379
379
- the file did not upload successfully
0 commit comments