I have an ImageField in one of my models so that users can upload an image. When a user submits an upload form, I want to verify that the file in question is a fully valid and displayable image.
I tried using PIL to verify that the image was in fact authentic, but using
from PIL import Image Image.open(model.file) Image.verify() No matter what file I give it though, it always throws an exception.
Anyone know of an easy way to verify the file?