From d138ddb09fa20d3f96bfbf673de4acfc418de9b0 Mon Sep 17 00:00:00 2001 From: sunhao Date: Mon, 11 Mar 2024 18:02:22 +0800 Subject: [PATCH] * zin: fix downloading file name with space. --- module/file/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/file/model.php b/module/file/model.php index 0dae2fd462..3728547fa4 100755 --- a/module/file/model.php +++ b/module/file/model.php @@ -936,7 +936,7 @@ class fileModel extends model /* Judge the content type. */ $mimes = $this->config->file->mimes; $contentType = isset($mimes[$fileType]) ? $mimes[$fileType] : $mimes['default']; - $fileName = urlencode($fileName); + $fileName = str_replace('+', ' ', urlencode($fileName)); helper::header('Content-type', $contentType); helper::header('Content-Disposition', "attachment; filename=\"$fileName\"");