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
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
Dear All,
Thank you for replying to my inquiry regarding retrieving image. Especially
to Connie Chan who shares her/his code, and advise, and also to Zentara who
tested my code. Thank you very BIG!
I used the same code that I've posted and right now its working fine, just
like
Zentara replied.
On Sat, 17 Aug 2002 19:28:08 +0800, [EMAIL PROTECTED] (Archie) wrote:
>Here is the code, when i am executing this code in the browser, it prompts
>"The browser contains no data."
>I followed your suggestion to put \r\n\r\n in the print content-type line
>and nothings happen, still the same,
>no i
: "Archie" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Friday, August 16, 2002 9:11 PM
> > Subject: Re: Help!! Retrieving Image File
> >
> >
> > > Thanks 4 replying Connie, but
ssage -
> From: "Archie" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, August 16, 2002 9:11 PM
> Subject: Re: Help!! Retrieving Image File
>
>
> > Thanks 4 replying Connie, but it
Yes, you forgot to post your code =)
Rgds,
Connie
- Original Message -
From: "Archie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 16, 2002 9:11 PM
Subject: Re: Help!! Retrieving Image File
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
14 matches
Mail list logo