on at cs.ait.ac.th
Tue Feb 12 03:07:16 UTC 2008
> 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
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
$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
More information about the freebsd-questions