fix:修复文件名为中文时可能上传失败的问题

This commit is contained in:
妙码生花 2023-08-21 19:54:21 +08:00
parent 70eb0ace5e
commit 72f3539797

View File

@ -186,7 +186,7 @@ class Upload
'{sec}' => date("s"),
'{random}' => Random::build(),
'{random32}' => Random::build('alnum', 32),
'{filename}' => substr($filename, 0, 15),
'{filename}' => mb_substr($filename, 0, 15),
'{suffix}' => $suffix,
'{.suffix}' => $suffix ? '.' . $suffix : '',
'{filesha1}' => $sha1,