forked from rDrama/rDrama
fds
parent
e12731a419
commit
b8eb7a1440
|
@ -580,11 +580,9 @@ def thumbnail_thread(pid):
|
||||||
image = PILimage.open(BytesIO(x.content))
|
image = PILimage.open(BytesIO(x.content))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
db.close()
|
db.close()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
with open("image.webp", "wb") as file:
|
with open("image.webp", "wb") as file:
|
||||||
for chunk in image_req.iter_content(1024):
|
for chunk in image_req.iter_content(1024):
|
||||||
file.write(chunk)
|
file.write(chunk)
|
||||||
|
@ -593,9 +591,9 @@ def thumbnail_thread(pid):
|
||||||
db.add(post)
|
db.add(post)
|
||||||
db.commit()
|
db.commit()
|
||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@app.post("/submit")
|
@app.post("/submit")
|
||||||
@limiter.limit("6/minute")
|
@limiter.limit("6/minute")
|
||||||
@is_not_banned
|
@is_not_banned
|
||||||
|
|
Loading…
Reference in New Issue