I've finally figured out how to download the file with the filename rather than download.php. It was actually a header issue:
header("Content-type: $filetype");
header("Content-Disposition: attachment; filename=\"$file\"\n");
header("Content-Length: $size");
header("Accept-Ranges: bytes");
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-transfer-encoding: binary");
header("Content-type: ".$filetype);
header("Content-Disposition: attachment; filename=$file");
I have the generic upload working and the policy specific download working. I'm making the new policy page look as close to the old as possible, I know how some people hate change!
