Opened 16 years ago

Closed 16 years ago

#5928 closed (worksforme)

form cleaned_data does not have uploaded request.FILES content

Reported by: stefan@… Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



I've file uploading in my project for a while now and it worked pretty fine.
But after not testing it for a while it seems that since a more or less recent django svn version
things stopped working. My code is like this:

        print request.FILES
        # files have <content omitted> printed

        print request.POST
        # same as above, content is there

        form = TestForm(request.POST)

        if form.is_valid():
           # form.cleaned_data does not contain content anymore

I've tried some things and I can only think of a bug in django.

Change History (1)

comment:1 Changed 16 years ago by Karen Tracey <kmtracey@…>

Resolution: worksforme
Status: newclosed

Or perhaps things have changed that your code needs to adjust to. Current doc here describes passing request.FILES in when constructing the form:

It's marked new in development version so maybe it used to be done via the request.POST.update? I don't know, but I do know uploading files works for me using the method described in the doc, as of a very recent checkout.

Note: See TracTickets for help on using tickets.
Back to Top