Merge pull request #20 from DenverCoder1:new-wallpaper

feat(site): Set default filename for random download
This commit is contained in:
Jonah Lawrence 2022-01-12 16:22:35 -07:00 committed by GitHub
commit a3d7713fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ if (isset($_GET['random'])) {
header('Content-Type: image/gif'); 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 // return the contents of the image at the url
exit(file_get_contents($random_image_path)); exit(file_get_contents($random_image_path));
} }