diff options
author | Andrew Dolgov <[email protected]> | 2017-02-04 11:32:24 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-02-04 11:32:24 +0300 |
commit | 0442cbb6c16e22cf172ade58d675c1e2001646d1 (patch) | |
tree | f40088063e651415619a8ae1e268e4f04d27712a /classes/handler/public.php | |
parent | 60e97d9e63df7cdbf6fc9ece09ae4bb79e4a5272 (diff) |
image cache: send files as content-disposition: attachment; add .png suffix to image urls
Diffstat (limited to 'classes/handler/public.php')
-rw-r--r-- | classes/handler/public.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php index a516b6c5c..0fc8476c7 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -1051,9 +1051,11 @@ class Handler_Public extends Handler { if ($hash) { - $filename = CACHE_DIR . '/images/' . $hash . '.png'; + $filename = CACHE_DIR . '/images/' . $hash; if (file_exists($filename)) { + header("Content-Disposition: attachment; filename=\"".basename($filename)."\""); + /* See if we can use X-Sendfile */ $xsendfile = false; if (function_exists('apache_get_modules') && |