mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Return error when fileGet binary file
This commit is contained in:
parent
0bc9374a7d
commit
79f10ffe0c
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue