improvements for pdf upload function

This commit is contained in:
Cervinko Cera
2016-04-05 20:50:28 +02:00
parent 3324669702
commit bda3055a19
3 changed files with 8 additions and 4 deletions
+3
View File
@@ -760,6 +760,9 @@ def upload():
if fileextension.upper() == ".PDF":
title = filename_root
author = "Unknown"
else:
flash("Upload is only available for PDF files", category="error")
return redirect(url_for('index'))
title_dir = helper.get_valid_filename(title, False)
author_dir = helper.get_valid_filename(author.decode('utf-8'), False)