in reply to Reading a File Uploaded to a cgi script
and the parsing script:<FORM ACTION="apply.cgi" METHOD="POST" ENCTYPE="multipart/form-data"> Resume: <INPUT TYPE="FILE" NAME="resume">
$FORM{'resume'} contains the name of the uploaded file and $FORM{'resume_data'} contains the actual data uploadedif ($FORM{'resume'}) { #read in the resume's data my ($data,$size); while( $size = read( $FORM{'resume'}, $data, 1024) ) { $FORM{'resume_data'} .= $data; $FORM{'resume_size'} += $size; } }
open (FH, ">/tmp/resume.$$") || die; while (<$FORM{'resume'}>) { print FH; } close (FH);
|
|---|