Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django - Upload a valid image

I'm using Ubuntu, Django 1.3, Python 2.7.
When I try to upload certain types of image, I get this message:

Upload a valid image. The file you uploaded was either not an image or a corrupted image.

It's happening with PNG and JPG (the formats that I need).
tiff and gif (that I don't and will never care about) are working.

What can I do ?

like image 402
Pierre de LESPINAY Avatar asked Feb 23 '23 02:02

Pierre de LESPINAY


1 Answers

Install PIL !

$ sudo apt-get install python-imaging

(for Ubuntu or other Debian distrib)

like image 153
Pierre de LESPINAY Avatar answered Feb 25 '23 14:02

Pierre de LESPINAY