Hello All,

I am having a trough time with the Image Field. I am trying to upload an
image and even if i upload a valid image, the form validator throws an error
"Upload a valid image. The file you uploaded was either not an image or a
corrupted image.". I have verified that PIL is installed in my system, even
then its showing this validation error. I have not done any processing as
such. In my models.py i have the following statement:
avatar = models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH,
null=True)

where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should be
in my MEDIA_URL. Then in my forms.py i have the following statment:
avatar = forms.ImageField(label=_('Avatar'))

I am not sure if i have done something wrong. Please guide me. Thanks

Regards,

Swaroop Shankar V

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

Reply via email to