kb2yht has asked for the wisdom of the Perl Monks concerning the following question:
SO, I have directory full of JPEG images used as a large part of
the Human interface "GUI " to
to a MySQL query output, Embeded in a page.
I can not make the dir accessable to the world via the web server,
But a script running on the server can easly see the images,
Is there a way to use a small CGI to open and send the image to the cliant?
like....
<img src=$myscript/$image_filename>
in as the img source , then have
to open and then print the file ?? , This does not work, but I think its only because of an over sight in the perl or in the way I'me pointing the WEb-cliant to the link.
Perhaps One of the older and wiser Monks may have a answer, ( or maby just a Wiser monk will thel me to FIYS )
Thanks
Bill Nolan,
<img src=$myscript/$image_filename>
in as the img source , then have
myscript.pl
#!/usr/local/bin/perl -W use CGI qw/:all/; my $query = CGI::new(); my $file = $query->path_info(); open ( IMAGE, $file ); while ( <IMAGE> ) { print $_; } exit ;
to open and then print the file ?? , This does not work, but I think its only because of an over sight in the perl or in the way I'me pointing the WEb-cliant to the link.
Perhaps One of the older and wiser Monks may have a answer, ( or maby just a Wiser monk will thel me to FIYS )
Thanks
Bill Nolan,
|
---|
Replies are listed 'Best First'. | |
---|---|
(ar0n) Re: Not Strictly A perl question.
by ar0n (Priest) on Jun 30, 2001 at 22:34 UTC | |
Re: Not Strictly A perl question.
by jepri (Parson) on Jun 30, 2001 at 22:35 UTC | |
by Zaxo (Archbishop) on Jul 01, 2001 at 00:19 UTC | |
Re: Not Strictly A perl question.
by bikeNomad (Priest) on Jun 30, 2001 at 22:27 UTC | |
Re: Not Strictly A perl question.
by epoptai (Curate) on Jun 30, 2001 at 22:50 UTC | |
Re: Not Strictly A perl question.
by Beatnik (Parson) on Jun 30, 2001 at 22:28 UTC | |
Re: Not Strictly A perl question.
by kb2yht (Acolyte) on Jul 07, 2001 at 19:10 UTC |
Back to
Seekers of Perl Wisdom