On Tue, Mar 20, 2012 at 8:24 PM, Sachin Gupta <sachingupta...@gmail.com> wrote: > In a file upload form if the enctype attribute is not set then, django > throws the error > > This field is required > > In case null=True and blank = True is set for the file field then nothing > happens at all. Shouldn't it be such that django should throw some other > error since we are sending a File object and the enctype attribute is not > sent. Django should be expecting a file backend and instead of throwing form > error it should so some other kind of error. >
In a file upload form, if the enctype is not 'multipart/form-data', then the browser will not upload the file, ergo there is no file object. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.