Skip to content

Commit

Permalink
#2269 unicode 파일을 다운로드할 때 파일명 문제 고침
Browse files Browse the repository at this point in the history
  • Loading branch information
bnu committed Jun 22, 2018
1 parent 7bb8ddd commit 1d7d460
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/file/file.controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ public function procFileOutput()
}
else
{
$filename_param = "filename*=UTF-8''" . rawurlencode($filename) . '; filename="' . rawurlencode($filename) . '"';
$filename_param = sprintf('filename="%s"; filename*=UTF-8\'\'%s', $filename, rawurlencode($filename));
}
}
elseif(preg_match('#(?:Firefox|Safari|Trident)/(\d+)\.#', $_SERVER['HTTP_USER_AGENT'], $matches) && $matches[1] >= 6)
{
$filename_param = "filename*=UTF-8''" . rawurlencode($filename) . '; filename="' . rawurlencode($filename) . '"';
$filename_param = sprintf('filename="%s"; filename*=UTF-8\'\'%s', $filename, rawurlencode($filename));
}
elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
{
Expand Down

0 comments on commit 1d7d460

Please sign in to comment.