Author: kmtracey
Date: 2009-05-17 13:45:25 -0500 (Sun, 17 May 2009)
New Revision: 10816

Modified:
   django/trunk/docs/topics/http/file-uploads.txt
Log:
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.


Modified: django/trunk/docs/topics/http/file-uploads.txt
===================================================================
--- django/trunk/docs/topics/http/file-uploads.txt      2009-05-17 18:11:58 UTC 
(rev 10815)
+++ django/trunk/docs/topics/http/file-uploads.txt      2009-05-17 18:45:25 UTC 
(rev 10816)
@@ -30,6 +30,10 @@
 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::


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to