Re: Help!! Retrieving Image File

2002-08-22 Thread Bill Moseley
At 11:21 PM 08/21/02 +0800, Connie Chan wrote: >This works for me =) "works" in some measure of the word, yes. >#!Perl no -w >use strict; >use CGI::Carp (fatalsToBrowser); >$| = 1; Why non-buffered? > >my $filepath = 'some/where/the/file/is.jpg"; syntax error. >open IMG, "$file

RE: Help!! Retrieving Image File

2002-08-21 Thread Bob Showalter
> -Original Message- > From: David Zhuo [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 21, 2002 1:41 PM > To: Bob Showalter > Cc: [EMAIL PROTECTED] > Subject: RE: Help!! Retrieving Image File > > > On Wed, 2002-08-21 at 10:44, Bob Showalter wrote:

RE: Help!! Retrieving Image File

2002-08-21 Thread David Zhuo
On Wed, 2002-08-21 at 10:44, Bob Showalter wrote: > > -Original Message- > > From: David Zhuo [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 21, 2002 1:12 PM > > To: Connie Chan > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; cgi mailing list > >

RE: Help!! Retrieving Image File

2002-08-21 Thread Bob Showalter
> -Original Message- > From: David Zhuo [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 21, 2002 1:12 PM > To: Connie Chan > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; cgi mailing list > Subject: Re: Help!! Retrieving Image File > > > where do you get the

Re: Help!! Retrieving Image File

2002-08-21 Thread David Zhuo
gt; Connie > > > > > - Original Message - > From: "david" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, August 21, 2002 6:48 AM > Subject: Re: Help!! Retrieving Image F

Re: Help!! Retrieving Image File

2002-08-21 Thread Connie Chan
[.] > > #!/usr/local/bin/perl -w > use strict; > > open IMAGE, 'test.jpg' or die "Failed to open image $!"; > my $buf_chunk_size = 1024 * 16; > my $buffer; > binmode IMAGE; > binmode STDOUT; > > print "Content-Type: image/jpeg\n\n"; > print $buffer while read IMAGE, $buffer, $buf_chunk_siz

Re: Help!! Retrieving Image File

2002-08-21 Thread Bill Moseley
;david" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> >Sent: Wednesday, August 21, 2002 6:48 AM >Subject: Re: Help!! Retrieving Image File > > >> not sure if you already have the answer to this one but you: >&g

Re: Help!! Retrieving Image File

2002-08-21 Thread Connie Chan
: Wednesday, August 21, 2002 6:48 AM Subject: Re: Help!! Retrieving Image File > not sure if you already have the answer to this one but you: > > binmode IMAGE; > print "Content-type: image/jpeg\n\n"; > while(){ > print; > } > > should probably be: > > pr

Re: Help!! Retrieving Image File

2002-08-20 Thread david
not sure if you already have the answer to this one but you: binmode IMAGE; print "Content-type: image/jpeg\n\n"; while(){ print; } should probably be: print "Content-type: image/jpeg\n\n"; binmode IMAGE; while(){ print; } you need to print the text header first and than print the bin

Re: Help!! Retrieving Image File

2002-08-16 Thread Archie
Thanks 4 replying Connie, but it didn't work. i already did binmode STDOUT, and tried this print "Content-type: image/jpeg\r\n\r\n"; as advise. i just hope some1 here can remind me what else i forgot to do. thanks... Connie Chan <[EMAIL PROTECTED]> wrote in message 001601c2439e$68cc2be0

Re: Help!! Retrieving Image File

2002-08-14 Thread Connie Chan
> Code 1: It didnt work... > > #!/usr/bin/perl > > use CGI; > $query = new CGI; > my $filepath='/home/myaccount/uploads/laptop.jpg'; > > print $query->header('image/jpeg'); > print $filepath; > Of cause, you didn't open the file and read the file. You are trying to print "/home/myaccount/upl