master
Aevann1 2021-10-03 21:31:29 +02:00
parent 6264b8eec4
commit a717beca1f
1 changed files with 2 additions and 4 deletions

View File

@ -503,16 +503,14 @@ def settings_images_profile(v):
if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403
file = request.files["profile"]
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}.webp'
file.save(name)
request.files["profile"].save(name)
highres = process_image(name)
if not highres: abort(400)
name = f'/hostedimages/{int(time.time())}{secrets.token_urlsafe(8)}.webp'
file.save(name)
request.files["profile"].save(name)
imageurl = process_image(name, True)
if not imageurl: abort(400)