diff --git a/files/routes/posts.py b/files/routes/posts.py index 9735446dde..94b83a8ff3 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -580,11 +580,9 @@ def thumbnail_thread(pid): image = PILimage.open(BytesIO(x.content)) else: - db.close() return - with open("image.webp", "wb") as file: for chunk in image_req.iter_content(1024): file.write(chunk) @@ -593,9 +591,9 @@ def thumbnail_thread(pid): db.add(post) db.commit() db.close() - return + @app.post("/submit") @limiter.limit("6/minute") @is_not_banned