- or download this
<FORM ENCTYPE="multipart/form-data" ACTION="upload.cgi" METHOD=POST>
Upload this file: <INPUT NAME="userfile" TYPE="file"><br>
Description:<input type="text" name="description"><br>
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
- or download this
$rawfile = $cgi->param("userfile");
if ( $rawimage =~ /([\w\s\W]+)\.(\w+)/ ) {
...
print OUTFILE $buffer or die "Could not upload file $filename: $!"
+;
}
close (OUTFILE);
- or download this
use CGI qw(:all escape);
use CGI::Carp qw(fatalsToBrowser);
...
open (x,">$tempfile");
print x $buffer;
close (x);