From 53c520097c9a45a07e6ff86ce771954f6d6c01ae Mon Sep 17 00:00:00 2001 From: profiteroles Date: Wed, 12 Jun 2019 22:35:01 -0700 Subject: [PATCH] Set filename in case browser downloads file --- web/handle_zip.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/handle_zip.php b/web/handle_zip.php index a9ea32e..26261c7 100644 --- a/web/handle_zip.php +++ b/web/handle_zip.php @@ -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);