* zin: fix downloading file name with space.

This commit is contained in:
sunhao
2024-03-11 18:02:55 +08:00
parent 5ad4a288b8
commit d138ddb09f
+1 -1
View File
@@ -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\"");