1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-22 11:36:38 +02:00

cache_starred_images: set filename when sending cached image

This commit is contained in:
Andrew Dolgov 2016-01-06 21:00:53 +03:00
parent 9b736a20b3
commit c203486e04

View File

@ -59,10 +59,12 @@ class Cache_Starred_Images extends Plugin implements IHandler {
if ($hash) {
$filename = $this->cache_dir . "/" . $hash;
$filename = $this->cache_dir . "/" . basename($hash);
$is_video = strpos($filename, ".mp4") !== FALSE;
if (file_exists($filename)) {
header("Content-Disposition: attachment; filename=\"$hash\"");
/* See if we can use X-Sendfile */
$xsendfile = false;
if (function_exists('apache_get_modules') &&