Fix config page
This commit is contained in:
parent
82c55ba038
commit
e77d63294e
1 changed files with 3 additions and 3 deletions
|
@ -42,11 +42,11 @@ class UiRequestPlugin(object):
|
||||||
DebugMedia.merge(file_path)
|
DebugMedia.merge(file_path)
|
||||||
|
|
||||||
if file_path.endswith("js"):
|
if file_path.endswith("js"):
|
||||||
data = _.translateData(open(file_path).read(), mode="js")
|
data = _.translateData(open(file_path).read(), mode="js").encode("utf8")
|
||||||
elif file_path.endswith("html"):
|
elif file_path.endswith("html"):
|
||||||
data = _.translateData(open(file_path).read(), mode="html")
|
data = _.translateData(open(file_path).read(), mode="html").encode("utf8")
|
||||||
else:
|
else:
|
||||||
data = open(file_path).read()
|
data = open(file_path, "rb").read()
|
||||||
|
|
||||||
return self.actionFile(file_path, file_obj=io.BytesIO(data), file_size=len(data))
|
return self.actionFile(file_path, file_obj=io.BytesIO(data), file_size=len(data))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue