Fixing upload failure

This commit is contained in:
Yusur 2019-05-02 19:50:20 +02:00
parent 244f689afc
commit 4d35f84304

4
app.py
View file

@ -343,8 +343,8 @@ def create():
pub_date=datetime.datetime.now())
file = request.files.get('file')
if file:
print(file.name)
ext = file.name.split('.')[-1]
print('Uploading', file.filename)
ext = file.filename.split('.')[-1]
upload = Upload.create(
type=ext,
message=message