From 0e41ae50d53c0cf3bc53a0b281d7aed1dc3c3273 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 7 Apr 2019 11:00:24 +0200 Subject: [PATCH] Fix empty attchment issue --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index e320d83..836387c 100644 --- a/app.py +++ b/app.py @@ -1821,7 +1821,7 @@ def api_new_note(): 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"] rfilename = secure_filename(file.filename) with BytesIO() as buf: