Other Things You Can Do
Other Things You Can Do
- Get the original file's name
$filename = param('uploaded file');- (Mame and filehandle are the same!)
- Get the file's MIME type
$filename = param('uploaded file');$info = uploadInfo($filename);$type = $info->{'Content-Type'};die "Text files only" unless $type =~ /^text/;