From de854bb269a6c28e115e03f43e4e10dafb242900 Mon Sep 17 00:00:00 2001 From: Dmitry Dulepov Date: Wed, 4 Mar 2020 13:51:25 +0300 Subject: [PATCH] [BUGFIX] Fix #138: file names with umlauts may download with bad characters in the file name --- Classes/Hooks/FileDumpHook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Hooks/FileDumpHook.php b/Classes/Hooks/FileDumpHook.php index d52d027..6d08835 100644 --- a/Classes/Hooks/FileDumpHook.php +++ b/Classes/Hooks/FileDumpHook.php @@ -210,7 +210,7 @@ protected function dumpFileContents($file, $asDownload, $resumableDownload) } $contentDisposition = $asDownload ? 'attachment' : 'inline'; - header('Content-Disposition: ' . $contentDisposition . '; filename="' . $downloadName . '"'); + header('Content-Disposition: ' . $contentDisposition . '; filename=*=UTF-8\'\'' . rawurlencode($downloadName)); header('Content-Type: ' . $file->getMimeType()); header('Expires: -1'); header('Cache-Control: public, must-revalidate, post-check=0, pre-check=0');