title: Getting the name & extension of an uploaded file using python (google app engine)
body: <p>I am using a form to upload files to the google app engine and store them in the datastore. l would also like to store the original file name and extension for presentation purposes.</p>
  
  <p>Is there a way of retrieving this data from the post sever side or can it only be gathered client side and sent as separate fields (e.g. <a href="http://www.tinyurl.com/5jybfq" rel="nofollow noreferrer">http://www.tinyurl.com/5jybfq</a>)?</p>
  
  <p>Many thanks.</p>
  
  <p><strong>For those that follow the solution dased on the answer below:</strong> </p>
  
  <pre><code>this_file = self.request.params["file_upload_form_field_name"].filename 
  
  (this_file_name, this_file_extension) = os.path.splitext(this_file) 
  
  self.response.out.write("File name: " + this_file_name + "&lt;br&gt;") 
  
  self.response.out.write("File extension: " + this_file_extension + "&lt;br&gt;") 
  </code></pre>