From 9f2c604896480c171548d7ce91fc54f5cd7619ca Mon Sep 17 00:00:00 2001 From: Jonah Lawrence Date: Wed, 12 Jan 2022 16:21:50 -0700 Subject: [PATCH] feat(site): Set default filename for random download --- index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.php b/index.php index 22efcde..d65dc91 100644 --- a/index.php +++ b/index.php @@ -31,6 +31,9 @@ if (isset($_GET['random'])) { header('Content-Type: image/gif'); } + // set default filename + header('Content-Disposition: inline; filename="' . basename($random_image_path) . '"'); + // return the contents of the image at the url exit(file_get_contents($random_image_path)); }