Hello,
I am trying desperately to do a very simple file upload with Django, without (for now) bothering with templating & co.
My HTML is:
<form
id="uploader"
action="bytes/"
enctype="multipart/form-data"
method="post"
>
<input type="file" name="uploaded"/>
<input type="submit" value="upload"/>
</form>
My Python is (knowing it is a POST):
if path=="bytes/":
if 'uploaded' in request.FILES:
return HttpResponse("you uploaded a file")
else:
return HttpResponse("did not get the file")
I don't understand why I'm always getting the "did not get the file" message...
Can anyone help me, please???