python - Upload .xls file with html input file -


i can upload .csv, , .json file following code. however, when try upload .xls files, app gets locked up. need make work correctly excel files?

class createteam(basehandler):     def post(self):         file = self.request.get('file')  # line locks excel files 

my html looks this...

<form method="post" action="/create_team" enctype="multipart/form-data">     <div>         <p>upload file</p>         <input type="file" name="file">     </div> </form> 

i have other input fields on form posted same submit button. mime type issue. if so, how set mime type uploaded file?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -