Set filename in case browser downloads file

This commit is contained in:
2019-06-12 22:35:01 -07:00
parent 5a0d73bbfd
commit 53c520097c

View File

@@ -21,6 +21,7 @@ if (!$mime = $types[pathinfo($stat['name'],PATHINFO_EXTENSION)]) {
$mime = "text/plain";
}
header("Content-Disposition: inline; filename=".$stat['name']);
header("Content-Type: ".$mime);
header("Content-Length: ".$stat['size']);
echo $zip->getFromIndex(0);