How can I check if a file uploaded by a user is a real jpg file in Python (Google App Engine)?
This is how far I got by now:
Script receives image via HTML F
Use PIL. If it can open the file, it's an image.
From the tutorial...
>>> import Image >>> im = Image.open("lena.ppm") >>> print im.format, im.size, im.mode