anthony wrote: > > Hi, > > I have an upload script, and i want to check the file size before it > uploads. > > Any suggestion is appreciated > > Anthony >
here's some old code that does that, might be something built-in in CGI.pm as well: my $tempFile = CGI::tmpFileName($img_filename); my @file_info = stat ($tempFile); if ($#file_info > 0 && $file_info[7] < $max_size && $file_info[7] > 0) { copy($tempFile, $path.$filename); } else { error_msg ("Max size is $max_size"); } } > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]