Hello All,
An update to my previous question. The error occurs only if I try to upload
jpeg images, other formats like gif, png do not have this issue. Please let
me know if there is any extension that i need to install to support jpeg.
Please note that mine is a linux machine (Opensuse 11.3). Thanks

Regards,

Swaroop Shankar V



On Mon, Oct 24, 2011 at 7:07 AM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> 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