From 3c494eb915187bb5c3d5808b595e50cf54f84d49 Mon Sep 17 00:00:00 2001 From: Jason Park Date: Sun, 24 Sep 2023 20:03:30 +0900 Subject: [PATCH] feat: adding split to properly decode base64 --- src/lambda/test-post-thread/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lambda/test-post-thread/index.py b/src/lambda/test-post-thread/index.py index 459150b6e..79db2598c 100644 --- a/src/lambda/test-post-thread/index.py +++ b/src/lambda/test-post-thread/index.py @@ -17,7 +17,7 @@ def test_post_thread(thread, uid): object_key = None if "image" in thread: - image_data = base64.b64decode(thread["image"]) + image_data = base64.b64decode(thread["image"].split(',')[1]) content_type = thread.get("contentType", "image/jpeg") # Validate the content type if content_type not in ["image/jpeg", "image/png", "image/gif"]: