Skip to content

Commit

Permalink
feat: adding split to properly decode base64
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonNotJson committed Sep 24, 2023
1 parent 9c081bd commit 3c494eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lambda/test-post-thread/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down

0 comments on commit 3c494eb

Please sign in to comment.