Hi Djangonauts,
i've a problem here driving me nuts - obviously I don't get it how to
do a simple file upload:
With a form like this:
<form action="." method="post" id="form" enctype="multipart/form-
data">
<input type='file' name='foo'/>
<input type='submit' value='submit'/>
</form>
and a view function like this:
def test(request):
if request.method=='GET':
return render_to_response('test.html')
else:
assert False, request.FILES
request.FILES has the following value (f. ex. a pdf):
<MultiValueDict: {'foo': [{'content': '<omitted>', 'content-type':
'application/pdf', 'filename': 'cheeseShop.pdf'}]}>
As far as I understand, this means the file wasn't uploaded
('content': '<omitted>').
I'm running the latest checkout and have set the MEDIA_ROOT and
MEDIA_URL settings.
Anyone an idea why this doesn't work?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---