html - Getting name of file upload - Google App Engine Python -


i trying handler check extension of file upload ensure user isn't uploading malware or irrelevant files. can't seem find way filename server-side. this question , said self.request.get("file_input_name_attr").filename in recent versions of gae file object string , therefore cannot asked filename.

here's relevant parts of form:

<form action="/path" method="post" enctype="multipart/form-data">     <input type="file" name="uploadfile" /> </form> 

some posts (dating 2 years ago)

self.request.post["uploadfile"].filename 

but me self.request.post["uploadfile"] returns null value

please refer blobstore python api overview, see how files uploaded appengine.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -