Skip to content

Commit

Permalink
Disable base64 decoding for now
Browse files Browse the repository at this point in the history
  • Loading branch information
laurynas authored Apr 23, 2024
1 parent d01ec53 commit bf25e70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def reset_meter(meter_id):
def __request_image():
image_data = request.get_data()

if 'base64' in image_data.decode('utf-8'):
image_data = image_data.decode('utf-8').split('base64,')[1]
image_data = base64.b64decode(image_data)
# if 'base64' in image_data.decode('utf-8'):
# image_data = image_data.decode('utf-8').split('base64,')[1]
# image_data = base64.b64decode(image_data)

return Image.open(BytesIO(image_data))

0 comments on commit bf25e70

Please sign in to comment.