@@ -43,10 +43,9 @@ def save_json(filename, data, encoding='utf-8', indent=4, cls=None, sort_keys=Fa
ensure_ascii=False, cls=cls, sort_keys=sort_keys)
-def load_as_base64(filename: str) -> str:
+def load_as_base64(filename: str) -> bytes:
with open(filename, 'rb') as f:
raw_bytes = f.read()
b64_bytes = base64.b64encode(raw_bytes)
- b64_str = b64_bytes.decode()
- return b64_str
+ return b64_bytes