Fix empty attchment issue

This commit is contained in:
Thomas Sileo 2019-04-07 11:00:24 +02:00
parent 2bc1124a4f
commit 0e41ae50d5

2
app.py
View file

@ -1821,7 +1821,7 @@ def api_new_note():
inReplyTo=reply.id if reply else None, inReplyTo=reply.id if reply else None,
) )
if "file" in request.files: if "file" in request.files and request.files["file"].filename:
file = request.files["file"] file = request.files["file"]
rfilename = secure_filename(file.filename) rfilename = secure_filename(file.filename)
with BytesIO() as buf: with BytesIO() as buf: