Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get input file name and file extention using flask

lets say that I have <input name="upload" type="file"> and I am uploading picture.jpg. The question is how can I get the file name+extention? By other words the correct script for request.files.filename or request.upload.filename

like image 574
Max Avatar asked Jul 27 '14 12:07

Max


1 Answers

Found the answer. request.files['upload'].filename gives the file name and extension in flask

like image 199
Max Avatar answered Nov 15 '22 11:11

Max