From 4f72336301680a6cd9e87989314310014e8cf50a Mon Sep 17 00:00:00 2001 From: Thomas Casteleyn Date: Wed, 8 Jul 2020 16:35:56 +0200 Subject: [PATCH] Suggest correct filename on download --- pages/graphviz.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/graphviz.php b/pages/graphviz.php index df9ba9dd7..3ad2298d2 100644 --- a/pages/graphviz.php +++ b/pages/graphviz.php @@ -143,6 +143,7 @@ if (file_exists($sDotExecutable)) else { header('Content-type: image/svg+xml'); + header('Content-Disposition: inline; filename="'.$sClass.'.svg"'); readfile($sImageFilePath); } @unlink($sDotFilePath); @@ -150,6 +151,7 @@ if (file_exists($sDotExecutable)) else { header('Content-type: image/png'); + header('Content-Disposition: inline; filename="'.$sClass.'.png"'); readfile($sImageFilePath); }