> >     Is there a way, using Embperl, to send the image back 
> to the browser 
> > on-the-fly, that is, without having to save it on a file first? 
> > Something
> 
> This is something that comes up rather frequently. For future 
> reference, doing a search of the embperl mail archives
> (http://www.ecos.de/~mailarc/embperl/) is usually useful.
> 
> You can output a gif directly from embperl so:
> 
> <img src="graph.html?args=go&here=">

Last week I tried a couple of ways of doing this under EmbperlObject.
That is, from somepage.html try to ignore the output of base.html and
set the headers and content manually, while still having access to
things bound to the request object $req.

Is that even possible? I ended up configuring a /cgi-bin and creating a
CGI.pm script to dump out my binary data.

init.html:

[- $req = shift; $req->{dbh} = DBI ...; -]


base.html:

<html>
[- Execute ('*') -]
</html>

somepage.html:

[-
$req = shift;
$dbh = $req->{dbh};
$http_headers_out{'Content-Type'} = "image/gif";
print OUT $dbh->selectrow_array("select imageblob from images where
id=234");       
-]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to