title: Python: Check if uploaded file is jpg
body: <p>How can I check if a file uploaded by a user is a real jpg file in Python (Google App Engine)?</p>
  
  <p>This is how far I got by now:</p>
  
  <p>Script receives image via HTML Form Post and is processed by the following code</p>
  
  <pre><code>...
  incomming_image = self.request.get("img")
  image = db.Blob(incomming_image)
  ...
  </code></pre>
  
  <p>I found mimetypes.guess_type, but it does not work for me.</p>