Commit ce24a1f8 authored by James Bennett's avatar James Bennett
Browse files

Fixed #7654: Documented the fact that file upload handlers must be modified...

Fixed #7654: Documented the fact that file upload handlers must be modified before reading request.POST


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 78ca7a6c
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -254,10 +254,12 @@ list::

.. note::

    You can only modify upload handlers *before* accessing ``request.FILES`` --
    it doesn't make sense to change upload handlers after upload handling has
    already started. If you try to modify ``request.upload_handlers`` after
    reading from ``request.FILES`` Django will throw an error.
    You can only modify upload handlers *before* accessing
    ``request.POST`` or ``request.FILES`` -- it doesn't make sense to
    change upload handlers after upload handling has already
    started. If you try to modify ``request.upload_handlers`` after
    reading from ``request.POST`` or ``request.FILES`` Django will
    throw an error.

    Thus, you should always modify uploading handlers as early in your view as
    possible.