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

@ -263,7 +263,7 @@ def api_comment(v):
file=request.files["file"]
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
name = f'/hostedimages/{time.time()}{secrets.token_urlsafe(8)}'
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}'
file.save(name)
url = process_image(name)
@ -684,7 +684,7 @@ def edit_comment(cid, v):
file=request.files["file"]
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
name = f'/hostedimages/{time.time()}{secrets.token_urlsafe(8)}'
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}'
file.save(name)
url = process_image(name)