From 44375b4b11fd7a2b7ef9e0b6f4e72e1d8b2ac3ef Mon Sep 17 00:00:00 2001 From: Samuel Sloniker Date: Tue, 22 Jun 2021 14:02:16 -0700 Subject: [PATCH] Replace `imgage` with `image` Closes #18 --- server/wss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/wss.py b/server/wss.py index 1ac09af..b7f0e1f 100644 --- a/server/wss.py +++ b/server/wss.py @@ -89,7 +89,7 @@ class HCRAServer(tornado.websocket.WebSocketHandler): with open(imgname, 'rb') as f: img = f.read() os.unlink(imgname) - self.write_message(f'pic%0x0%data:imgage/jpeg;base64,{base64.b64encode(img).decode("utf-8")}') + self.write_message(f'pic%0x0%data:image/jpeg;base64,{base64.b64encode(img).decode("utf-8")}') self.is_open = True self.client.ack() @@ -145,7 +145,7 @@ def img(imgname): with open(f'pieces/{imgname}.jpg', 'rb') as f: img = f.read() - response = f'pic%{imgname}%data:imgage/jpeg;base64,{base64.b64encode(img).decode("utf-8")}' + response = f'pic%{imgname}%data:image/jpeg;base64,{base64.b64encode(img).decode("utf-8")}' return response