HTTP POST
Olivier Nicole
on at cs.ait.ac.th
Tue Feb 12 03:07:16 UTC 2008
Hi,
> my program gets from the browser:
This part is not explicit enough. How is that what you get? Are they
the bytes on the network between your browser and the HTTP server? Are
they data decoded by your program?
If it is the bytes on the network, I have no answer.
If it is the data decoded by your program, I suggest an invalid
decoding mechanism.
As far as I remember the data sent by the browser should be all
headers, then a blank line, then the file contents MIME encoded.
Not knowing what program you wrote/language you used, I cannot tell
more, in Perl I use p5-CGI-Simple from the ports and it works like a
charm:
$filename=$CGI->param('jpegPhoto'); # filename of uploaded file
$mime=$CGI->upload_info($filename,'mime'); # MIME type of uploaded file
$size=$CGI->upload_info($filename,'size'); # size of uploaded file
my $imagehandle=$CGI->upload($filename);
Best regards,
Olivier
More information about the freebsd-questions
mailing list