This commit is contained in:
Aevann1 2021-10-03 21:12:07 +02:00
parent d966e43e24
commit dc0ede19a5
3 changed files with 8 additions and 8 deletions

View file

@ -509,7 +509,7 @@ def thumbnail_thread(pid):
db.close()
return
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}'
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}.webp'
with open(name, "wb") as file:
for chunk in image_req.iter_content(1024):
@ -836,7 +836,7 @@ def submit_post(v):
), 403
if file.content_type.startswith('image/'):
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}'
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}.webp'
file.save(name)
new_post.url = process_image(name)