summaryrefslogtreecommitdiff
path: root/matweb/frontend.py
diff options
context:
space:
mode:
Diffstat (limited to 'matweb/frontend.py')
-rw-r--r--matweb/frontend.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/matweb/frontend.py b/matweb/frontend.py
index 2e25467..8295f4e 100644
--- a/matweb/frontend.py
+++ b/matweb/frontend.py
@@ -53,8 +53,12 @@ def upload_file():
53 if not uploaded_file.filename: 53 if not uploaded_file.filename:
54 flash('No selected file') 54 flash('No selected file')
55 return redirect(request.url) 55 return redirect(request.url)
56 try:
57 filename, filepath = utils.save_file(uploaded_file, current_app.config['UPLOAD_FOLDER'])
58 except ValueError:
59 flash('Invalid Filename')
60 return redirect(request.url)
56 61
57 filename, filepath = utils.save_file(uploaded_file, current_app.config['UPLOAD_FOLDER'])
58 parser, mime = utils.get_file_parser(filepath) 62 parser, mime = utils.get_file_parser(filepath)
59 63
60 if parser is None: 64 if parser is None: