This commit is contained in:
Aevann1 2021-10-03 21:11:48 +02:00
parent 7b3591534f
commit d966e43e24
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/{time.time()}{secrets.token_urlsafe(8)}'
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}'
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/{time.time()}{secrets.token_urlsafe(8)}'
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}'
file.save(name)
new_post.url = process_image(name)