C
ccc31807
If you have a table in a database with an ID field (int), name
(varchar), a content-type field (varchar) and a data field (blob), and
you have binary data in the data field (like GIFs, JPEGs, PDFs, etc.),
you can display these directly in a new HTML page. A query from the
the database returns this:
id => 666
name => greg.jpg
content-type => image/jpeg
data => &w`l *� m :��mF�΄�A�4d��
How would you embed this data in an HTML page with a Content-Type of
text/html? The <img> element needs a src attribute, which I don't
have, and the <object> element likewise needs a URI for the data
attribute.
I can certainly display the "data" from the database, but it's
character based data (clubs, diamonds, hearts, and spades) rather than
the nice, pretty picture that's really there. Is there a PM that can
take a binary and turn it into something that will look like an image
in a browser?
Thanks, CC.
(varchar), a content-type field (varchar) and a data field (blob), and
you have binary data in the data field (like GIFs, JPEGs, PDFs, etc.),
you can display these directly in a new HTML page. A query from the
the database returns this:
id => 666
name => greg.jpg
content-type => image/jpeg
data => &w`l *� m :��mF�΄�A�4d��
How would you embed this data in an HTML page with a Content-Type of
text/html? The <img> element needs a src attribute, which I don't
have, and the <object> element likewise needs a URI for the data
attribute.
I can certainly display the "data" from the database, but it's
character based data (clubs, diamonds, hearts, and spades) rather than
the nice, pretty picture that's really there. Is there a PM that can
take a binary and turn it into something that will look like an image
in a browser?
Thanks, CC.