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
> -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:
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
> >
> -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
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
[.]
>
> #!/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
;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
: 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
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
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
> 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
Hello All,
I created a simple http upload file routine that uploads file into my
accounts sub folder uploads, "/home/myaccount/uploads". This is
already running.
Now what I wanted to do is retrieve the uploaded file from the
browser, and display the content in the browser if it is an image or
a
12 matches
Mail list logo