I'm looking to display a blob stored in a MySQL table within an HTML, using python-flask. But i am getting the broken image icon on the webpage when i run the code. The string data renders just fine, but not the blob. The web developer tool is indicating a 404 error when attempt to grab the blob resource, but i can't seem to make much of it. Looking for some help.
My Python code is:
@EMR.route("/apple")
def apple_luv():
t0 = gold.query.filter_by(patient_id=101).first()
tx = t0
return render_template("apple.html", t1=tx)
and HTML is shown below (FYI: tried a few syntaxes with the img tag since i was unsure)
<body>
{{t1.patient_fname}} | {{t1.patient_lname}} | {{t1.patient_addr}}
<br><br><br>
<img src="{{t1.patient_pic}}" />
<br><br><br>
<img src={{t1.patient_pic}} />
<br><br><br>
<img src="{{t1.patient_pic}}" >
<br><br><br>
<img src={{t1.patient_pic}} >
</body>
See the attachments for what my data looks like in MySQL DB, and the webpage outcome as well.