# $dl_file is absolute path to uploaded directory where files are kept my $download = url_param('dl'); if ($download ne "") { if (exists $uploadedfiles{$download}) { my($file, $type, $time, $size) = split(/::/, $uploadedfiles{$download}); my $load_file = join("", $dl_file, $file); print header(-type=>'application/octet-stream', -attachment=>"$load_file", -expires=>'-1d'); print start_html); print end_html; exit; } else { print header, start_html("ERROR"); print qq(
Does not exist!
); print end_html; exit; } }