Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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
  • Loading branch information...
commit efbe48cfcb98c7e0c15d47f40ad48058f3121198 1 parent 65966ce
Karen Tracey authored May 17, 2009

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  docs/topics/http/file-uploads.txt
4  docs/topics/http/file-uploads.txt
@@ -30,6 +30,10 @@ is a dictionary containing a key for each ``FileField`` (or ``ImageField``, or
30 30
 other ``FileField`` subclass) in the form. So the data from the above form would
31 31
 be accessible as ``request.FILES['file']``.
32 32
 
  33
+Note that ``request.FILES`` will only contain data if the request method was 
  34
+``POST`` and the ``<form>`` that posted the request has the attribute
  35
+``enctype="multipart/form-data"``. Otherwise, ``request.FILES`` will be empty.
  36
+
33 37
 Most of the time, you'll simply pass the file data from ``request`` into the
34 38
 form as described in :ref:`binding-uploaded-files`. This would look
35 39
 something like::

0 notes on commit efbe48c

Please sign in to comment.
Something went wrong with that request. Please try again.