summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/cache_starred_images/init.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index f1341a350..63637bfd8 100644
--- a/plugins/cache_starred_images/init.php
+++ b/plugins/cache_starred_images/init.php
@@ -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') &&