summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2009-05-17 18:47:32 +0000
committerKaren Tracey <kmtracey@gmail.com>2009-05-17 18:47:32 +0000
commitefbe48cfcb98c7e0c15d47f40ad48058f3121198 (patch)
tree4f700669c964d759cce3d143ade92196d4f7d78d /docs
parent65966cebd34b171f5156d7334dd9793906d5897c (diff)
[1.0.X] Fixed #10400: Added a note in the file uploads doc about the correct form type needed for file uploads to work. Thanks claudep and timo.
r10816 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/http/file-uploads.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt
index aebdc32a31..4a9340474d 100644
--- a/docs/topics/http/file-uploads.txt
+++ b/docs/topics/http/file-uploads.txt
@@ -30,6 +30,10 @@ is a dictionary containing a key for each ``FileField`` (or ``ImageField``, or
other ``FileField`` subclass) in the form. So the data from the above form would
be accessible as ``request.FILES['file']``.
+Note that ``request.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.
+
Most of the time, you'll simply pass the file data from ``request`` into the
form as described in :ref:`binding-uploaded-files`. This would look
something like::