feat(site): Set default filename for random download
This commit is contained in:
parent
716d1beaf9
commit
9f2c604896
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue