From 638193fcda8fdfd9c0ce8c7bde5d61d75ee751e5 Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Sat, 9 Aug 2025 12:46:57 +0200 Subject: [PATCH] Fix username not gathered in the upload route --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 0d5a750..d397299 100644 --- a/main.py +++ b/main.py @@ -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,