title: Name of a file in a POST request in Google AppEngine
body: <p>Given the html form ...</p>
  
  <pre><code>  &lt;form id="mainform" action="/upload" enctype="multipart/form-data" method="post"&gt;
          &lt;div&gt;
              &lt;input type="file" name="img"/&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;input type="submit" value="Send"&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>... and the handler ...</p>
  
  <pre><code>class Picture(db.Model):
    image = db.BlobProperty()
  
  class Submission(webapp.RequestHandler):
      def post(self):
          picture = Picture()
          image = self.request.get("img")
          picture.image = db.Blob(image)
          picture.put()
          self.redirect('/')
  </code></pre>
  
  <p>... is there any way within the handler to get the filename the user entered for the upload?  In PHP, I can refer to $_FILES['img']['name'], but I do not see what syntax, if any, would work with request.get.  In another question, another author uses a javascript routine in his html page to extract the filename the user chooses every time an OnChange event occurs, and then pass it separately in a hidden field.  Is that necessary?  PHP seems to get the filename for free.</p>