summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJános Roden <janos.roden@onbased.com>2020-09-16 10:22:38 +0200
committerCarlton Gibson <carlton.gibson@noumenal.es>2020-09-22 13:28:55 +0200
commit1d7c4addbdf7b90684a6464a21afb8f48019d338 (patch)
tree2e43e8cf7468b923554656b2983f5d1f06ee66be /docs
parent73d084bf9703395307d0b3ee977ceeb88f51479f (diff)
[3.1.x] Fixed #32004 -- Clarified docs for when request.FILES is set.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Backport of 9e4b1ad33e436e8fe60af756d7e09639ee886ac2 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/http/file-uploads.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt
index 534582cbf6..ef644853a9 100644
--- a/docs/topics/http/file-uploads.txt
+++ b/docs/topics/http/file-uploads.txt
@@ -38,9 +38,9 @@ subclass) in the form. So the data from the above form would
be accessible as ``request.FILES['file']``.
Note that :attr:`request.FILES <django.http.HttpRequest.FILES>` will only
-contain data if the request method was ``POST`` and the ``<form>`` that posted
-the request has the attribute ``enctype="multipart/form-data"``. Otherwise,
-``request.FILES`` will be empty.
+contain data if the request method was ``POST``, at least one file field was
+actually posted, and the ``<form>`` that posted the request has the attribute
+``enctype="multipart/form-data"``. Otherwise, ``request.FILES`` will be empty.
Most of the time, you'll pass the file data from ``request`` into the form as
described in :ref:`binding-uploaded-files`. This would look something like: