aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-10-09 01:38:10 +0300
committerBonfaceKilz2020-10-09 01:38:10 +0300
commit4e786c530d231718773cb629d3cac7449314c151 (patch)
treeb0d457c62a96dad969fa3678004d1aecfe656aca
parentf604c81a5cf501c39bf195159a5b1c70a97195dc (diff)
downloadgenenetwork2-4e786c530d231718773cb629d3cac7449314c151.tar.gz
Update base64 conversion
-rw-r--r--wqflask/wqflask/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 7fdc62e5..e8d17613 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -164,7 +164,7 @@ def tmp_page(img_path):
logger.info("initial_start_vars:", initial_start_vars)
imgfile = open(GENERATED_IMAGE_DIR + img_path, 'rb')
imgdata = imgfile.read()
- imgB64 = imgdata.encode("base64")
+ imgB64 = base64.b64encode(imgdata)
bytesarray = array.array('B', imgB64)
return render_template("show_image.html",
img_base64 = bytesarray )
@@ -790,7 +790,7 @@ def mapping_results_page():
logger.info("initial_start_vars:", initial_start_vars)
imgfile = open(TEMPDIR + img_path, 'rb')
imgdata = imgfile.read()
- imgB64 = imgdata.encode("base64")
+ imgB64 = base64.b64encode(imgdata)
bytesarray = array.array('B', imgB64)
result['pair_scan_array'] = bytesarray
rendered_template = render_template("pair_scan_results.html", **result)