Fix username not gathered in the upload route

This commit is contained in:
csd4ni3l
2025-08-09 12:46:57 +02:00
parent 75ac77dea8
commit 638193fcda

View File

@@ -124,7 +124,7 @@ def resize_image_file(path, max_side=256, fmt="JPEG"):
@app.route("/upload", methods=["POST"])
def upload():
try:
username, image_type, image_data = request.json["image_type"], request.json["image_data"].encode("utf-8")
username, image_type, image_data = request.json["username"], request.json["image_type"], request.json["image_data"].encode("utf-8")
if image_type == "jpeg":
image_data = image_data[23:] # data:image/jpeg;base64,