Have you got the right attribute in the form?

>From http://docs.djangoproject.com/en/dev/topics/http/file-uploads/

"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."

On 27 September 2010 13:21, Danny Bos <da...@stateempire.com> wrote:
> Can it even be done?
> It seems pretty ordinary but everything I'm trying expects it to be a
> request.FILE.
>
> Frustrating stuff.
>
>
> d
>
> On Sep 27, 11:24 am, Danny Bos <da...@stateempire.com> wrote:
>> Heya,
>>
>> I'm using the 'Valums File Uploader' which passes the file in the
>> request.POST as you can see below. I'm wondering how to get that data
>> into an actual file. Any ideas would be great as things like "for
>> chunk in f.chunks()" only works on request.FILES which in this case is
>> empty.
>>
>> Thanks,
>> Hope all is well your side of the planet.
>>
>> Eg DATA:
>>
>> GET:<QueryDict: {u'id': [u'1'], u'qqfile': [u'finger.png']}>,
>> POST:<QueryDict: {u'\ufffd \ufffd\ufffd\ufffdW-Oa\ufffd\ufffd~\ufffd|
>> \ufffd\x03\ufffd\x05\ufffd\ufffd\ufffdC\ufffdC\x1b\ufffd\ufffd\x0f/
>> \x1eY:\ufffdZ\ufffd \ufffd8': [u''], u'5]]\x1f\u04ff\x7f\ufffd\ufffd
>> \ufffd\x0f\x054\x15\u0622i\x1c\ufffd(\ufffdG\x01 \ufffd\x03u
>> \x05\ufffdL]b*\x002\x18PW\x00\ufffd\ufffd%\ufffd\x02 \ufffd\x01u
>> \x05\ufffdL]b*\x002\x18PW\x00\ufffd\ufffd%\ufffd\x02 \ufffd\x01u
>> \x05\ufffdL]b*\x002\x18PW\x00\ufffd\ufffd%\ufffd\x02 \ufffd\x01u
>> \x05\ufffdL]b*\x002\x18PW\x00\ufffd\ufffd%\ufffd\ufffd\ufffd\ufffd$X]]
>> \u0775k\ufffd\ufffd\ufffd\ufffd\ufffd\ufffdt\ufffd_2\x13\ufffd\u01cf
>> \x1fkkk\ufffd\ufffd\ufffdUe\ufffd\ufffd\ufffd\ufffdt2\u04ef\x1f?~|
>> \ufffd\u0529\ufffd\ufffd$\ufffdx}\ufffd\ufffd*\ufffdNw9': [u''],
>> u'\uff ... Etc ...
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to