Return error when fileGet binary file

This commit is contained in:
Tamas Kocsis 2020-09-04 18:15:16 +02:00
parent 0bc9374a7d
commit 79f10ffe0c

View file

@ -708,7 +708,10 @@ class UiWebsocket(object):
import base64
body = base64.b64encode(body).decode()
else:
body = body.decode()
try:
body = body.decode()
except Exception as err:
self.response(to, {"error": "Error decoding text: %s" % err})
self.response(to, body)
@flag.async_run