Abhishek Batra
2014-11-22 03:56:53 UTC
Hi,
This is probably not a Django issue, but just trying my luck.
I have an input field corresponding to a Django ImageField in a Django
template. Rendered, the HTML looks like:
<form action="/accounts/username/"
method="post"
id="profile_form"
enctype="multipart/form-data"></form>
... (other input fields and elements)<input form="profile_form" id="id_profile_pic" name="profile_pic" type="file" />
The corresponding View is an UpdateView. I found request.FILES to be empty
and request.cleaned_data to contain 'profile_pic': None.
I used firebug to track the POST data. It contained other fields but not
profile_pic.
Can anyone say why the file does not get uploaded? I've posted this
question to StakOverflow
<http://stackoverflow.com/questions/27059357/image-input-missing-from-post-request> as
well, in case someone wants reputation points.
Thanks,
Abhishek Batra
This is probably not a Django issue, but just trying my luck.
I have an input field corresponding to a Django ImageField in a Django
template. Rendered, the HTML looks like:
<form action="/accounts/username/"
method="post"
id="profile_form"
enctype="multipart/form-data"></form>
... (other input fields and elements)<input form="profile_form" id="id_profile_pic" name="profile_pic" type="file" />
The corresponding View is an UpdateView. I found request.FILES to be empty
and request.cleaned_data to contain 'profile_pic': None.
I used firebug to track the POST data. It contained other fields but not
profile_pic.
Can anyone say why the file does not get uploaded? I've posted this
question to StakOverflow
<http://stackoverflow.com/questions/27059357/image-input-missing-from-post-request> as
well, in case someone wants reputation points.
Thanks,
Abhishek Batra
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8cca9543-a913-4499-817b-efe059b27f9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8cca9543-a913-4499-817b-efe059b27f9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.