Skip to content
Snippets Groups Projects
Commit b6839072 authored by Axel Prel's avatar Axel Prel
Browse files

refactor image.py

parent db5d81f4
No related branches found
No related tags found
1 merge request!69Add qrcode converter
......@@ -61,4 +61,5 @@
if not value:
return ""
tmp = image(value)
......@@ -64,5 +65,2 @@
content = base64.b64decode(value)
mimetype = guess_mimetype(content)
return "data:{};base64,{}".format(mimetype, value.decode("ascii"))
return "data:{};base64,{}".format(tmp["mime-type"], tmp["body"])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment