Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Small typos in libraries/uploaded_files.rst #8889

Merged
merged 2 commits into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions user_guide_src/source/libraries/uploaded_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Uploading a file involves the following general process:
uploaded based on the preferences you set.
- Once uploaded, the user will be shown a success message.

To demonstrate this process here is brief tutorial. Afterward you'll
To demonstrate this process here is a brief tutorial. Afterward you'll
find reference information.

Creating the Upload Form
Expand Down Expand Up @@ -85,7 +85,7 @@ this code and save it to your **app/Controllers** directory:

Since the value of a file upload HTML field doesn't exist, and is stored in the
``$_FILES`` global, only :ref:`rules-for-file-uploads` can be used to validate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the upload file is stored in the $_FILES global"
This is not true or misleading.
The global $_FILES contains all the uploaded file information.

upload file with :doc:`validation`.
the upload file with :doc:`validation`.

The rule ``required`` cannot be used either, so if the file is required, use
the rule ``uploaded`` instead.
Expand Down Expand Up @@ -250,7 +250,7 @@ In controller:
Working with the File
*********************

Once you've retrieved the UploadedFile instance, you can retrieve information about the file in safe ways, as well as
Once you've retrieved the UploadedFile instance, you can get information about the file in safe ways, as well as
move the file to a new location.

.. _verify-a-file:
Expand Down Expand Up @@ -315,7 +315,7 @@ Returns the original file extension, based on the file name that was uploaded:
getClientMimeType()
-------------------

Returns the mime type (mime type) of the file as provided by the client. This is NOT a trusted value. For a trusted
Returns the mime type of the file as provided by the client. This is NOT a trusted value. For a trusted
version, use ``getMimeType()`` instead:

.. literalinclude:: uploaded_files/015.php
Expand Down Expand Up @@ -365,15 +365,15 @@ as the third parameter:
Check if the File Moved
-----------------------

Once the file has been removed the temporary file is deleted. You can check if a file has been moved already with
Once the file has been moved the temporary file is deleted. You can check if a file has been moved already with
the ``hasMoved()`` method, which returns a boolean:

.. literalinclude:: uploaded_files/018.php

When Moving Fails
-----------------

Moving an uploaded file can fail, with an HTTPException, under several circumstances:
Moving an uploaded file can fail, with an ``HTTPException``, under several circumstances:

- the file has already been moved
- the file did not upload successfully
Expand Down