mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 11:14:28 +00:00
Fix empty attchment issue
This commit is contained in:
parent
2bc1124a4f
commit
0e41ae50d5
1 changed files with 1 additions and 1 deletions
2
app.py
2
app.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue