diff --git a/module/file/model.php b/module/file/model.php index 6c37d6ca7c..e4849eb549 100755 --- a/module/file/model.php +++ b/module/file/model.php @@ -1010,7 +1010,7 @@ class fileModel extends model $contentType = isset($mimes[$fileType]) ? $mimes[$fileType] : $mimes['default']; /* Safari浏览器下载文件名乱码问题。 */ - if($fileType != 'zip' && preg_match("/Safari/", $_SERVER["HTTP_USER_AGENT"])) + if($_SERVER['CONTENT_TYPE'] == 'application/x-www-form-urlencoded' && preg_match("/Safari/", $_SERVER["HTTP_USER_AGENT"])) { $fileName = rawurlencode($fileName); $attachment = 'attachment; filename*=utf-8\'\'' . $fileName;