I am facing a problem in converting base64byte to image.I tried this
filename="chart.png"
with open(filename, "wb") as f:
f.write(base64.decodebytes(data))
where the base64byte is sored in data (like this b'iV.....'.after this i tried uploading the "filename" to my django database by doing
gimage.objects.create(name='Rufus5', pic1=filename)
.this creates an empty file chart.png in my django database.