Hey, I keep receiving this message on the production server when I try
to upload an image through the admin interface: Upload a valid image.
The file you uploaded was either not an image or a corrupted image.
Does anyone have a suggestion as to why? I was told it could be a PIL
issue not compiled with jpeg support but I do remember spending some
time compiling PIL to get things working and jpeg support works. I
also have django-filebrowser successfully uploading images to another
project... Anyone have another suggestion as to why I am receiving
this error?
Here is a simple test through console.
Python 2.5.4 (r254:67916, Sep 27 2009, 20:37:29)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>> image = Image.open("/var/django/projects/hockey/media/images/goal.jpg")
>>> image.format
'JPEG'
>>>
Here is my model:
class Roster(models.Model):
name = models.CharField(max_length=100)
position = models.CharField(max_length=100)
image = models.ImageField(upload_to='roster_uploads')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---