Home > Archive > PERL Programming > March 2004 > Re: Displaying images thats stored in Oracle database in CGI script
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Displaying images thats stored in Oracle database in CGI script
|
|
|
|
| Robert Nilsson 2004-03-18, 6:46 pm |
| Xref: kermit alt.perl:26520 comp.lang.perl.misc:305679
"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:c1gc9c$1ila8g$1@ID-184292.news.uni-berlin.de...
> Robert Nilsson wrote:
>
> So, why don't you try to find them? Or is it more convenient (to you)
> to make people post the same answers again?
>
> http://groups.google.se/groups?thre...0services.kq.no
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
>
Ofcourse it is :)
And thanks!
....or it could be that some people (like me) didn't know there was a way to
find old news messages. It's your pick.
/ Robert
| |
|
| "Robert Nilsson" <robert.nilsson@monet.no> wrote in message
news:c1ga6n$p98$1@services.kq.no...
> Hi all
>
> I've asked this before, but I've lost track of any answers.
then google is your friend
> ... I've got a
> Oracle database that includes pictures. I want to display some text
> information along with some smaller pictures in an Internet Explorer
window
> through a CGI script. I've got everything working when we talk about text,
> but images??? I have no idea how to treat the image data that is stored in
a
> BLOB column in Oracle.
>
> Anyone out there who got some tips and/or examples how to do it?
your <img> tag has a src="http://yourscript"
yourscript uses DBI to read the BLOB,
does binmode STDOUT if server is windows,
prints a Content-Type: image/whatever HTTP header before the content,
and then barfs out the BLOB to STDOUT.
gnari
| |
| Joe Smith 2004-03-18, 6:46 pm |
| gnari wrote:
> yourscript uses DBI to read the BLOB,
> does binmode STDOUT if server is windows,
Does binmode(STDOUT) if the server is Red Hat Linux with localization
set to UTF-8.
Best to always use binmode() when dealing with binary data, even on
Unix/Linux/POSIX.
-Joe
|
|
|
|
|