gixxerrider
Technical User
hopefully someone can help, everytime I upload the file size is always 0. below is the script.
my form does have the ENCTYPE="multipart/form-data" in the form action
Thanks for any help.
#$upload_dir is directory to upload to
#$xfile = $input{'file'}; file field on form
#$filename is the actual file name such as image.jpg after the path to the directory has been stripped off.
sub Upload {
open (OUTFILE, ">$upload_dir$filename"
while (my $bytesread = read($filename, my $buffer, 1024)) {
print OUTFILE $buffer;
}
close (OUTFILE);
#end of Upload
}
my form does have the ENCTYPE="multipart/form-data" in the form action
Thanks for any help.
#$upload_dir is directory to upload to
#$xfile = $input{'file'}; file field on form
#$filename is the actual file name such as image.jpg after the path to the directory has been stripped off.
sub Upload {
open (OUTFILE, ">$upload_dir$filename"
while (my $bytesread = read($filename, my $buffer, 1024)) {
print OUTFILE $buffer;
}
close (OUTFILE);
#end of Upload
}