我正在使用 Ubuntu、Django 1.3、Python 2.7。
当我尝试上传某些类型的图像时,我收到此消息:
Upload a valid image. The file you uploaded was either not an image or a corrupted image.
PNG 和 JPG(我需要的格式)正在发生这种情况。
tiff 和 gif(我不关心也永远不会关心)正在工作。
我能做什么?
最佳答案
安装 PIL!
$ sudo apt-get install python-imaging
(对于 Ubuntu 或其他 Debian 发行版)
关于python - Django - 上传有效图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8575120/