X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/f9f84c1e4389dc23e77b51dadd53410377128cfc..6ceeb5ff538f89833b1ab3f2ecd3cf89a3d8e17e:/file.php

diff --git a/file.php b/file.php
index d01bee6..400cb73 100644
--- a/file.php
+++ b/file.php
@@ -119,7 +119,7 @@ if (isset ($_GET['h']) && !empty ($_GET['h']))
 
     header ('Content-Length: ' . $link['file_size']);
     header ('Content-Type: ' . $link['mime_type']);
-    if (!jirafeau_is_viewable ($link['mime_type']))
+    if (!jirafeau_is_viewable ($link['mime_type']) || !$cfg['preview'])
     {
         header ('Content-Disposition: attachment; filename="' .
             $link['file_name'] . '"');