forked from rDrama/rDrama
fix
parent
fbab681b43
commit
94d1a7d98d
|
@ -621,15 +621,14 @@ def thumbnail_thread(pid):
|
|||
image_req=x
|
||||
with Image.open(BytesIO(x.content)) as i:
|
||||
size = len(i.fp.read())
|
||||
if size > 8 * 1024 * 1024:
|
||||
db.close()
|
||||
return
|
||||
|
||||
else:
|
||||
db.close()
|
||||
return
|
||||
|
||||
if size > 8 * 1024 * 1024:
|
||||
db.close()
|
||||
return
|
||||
|
||||
name = f'/images/{time.time()}'.replace('.','') + '.webp'
|
||||
|
||||
with open(name, "wb") as file:
|
||||
|
|
Loading…
Reference in New Issue