feat(site): Set default filename for random download

This commit is contained in:
Jonah Lawrence 2022-01-12 16:21:50 -07:00
parent 716d1beaf9
commit 9f2c604896
No known key found for this signature in database
GPG Key ID: 613851A667DC08A3
1 changed files with 3 additions and 0 deletions

View File

@ -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));
}