1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 07:05:56 +00:00

image cache: send files as content-disposition: attachment; add .png suffix to image urls

This commit is contained in:
Andrew Dolgov
2017-02-04 11:32:24 +03:00
parent 60e97d9e63
commit 0442cbb6c1
2 changed files with 18 additions and 15 deletions

View File

@@ -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') &&