mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
perf:上传文件使用部分文件名作为前缀以便识别
This commit is contained in:
parent
36d332baa0
commit
e95d03fa0b
@ -186,7 +186,7 @@ class Upload
|
||||
'{sec}' => date("s"),
|
||||
'{random}' => Random::build(),
|
||||
'{random32}' => Random::build('alnum', 32),
|
||||
'{filename}' => substr($filename, 0, 100),
|
||||
'{filename}' => substr($filename, 0, 15),
|
||||
'{suffix}' => $suffix,
|
||||
'{.suffix}' => $suffix ? '.' . $suffix : '',
|
||||
'{filesha1}' => $sha1,
|
||||
|
@ -7,7 +7,7 @@ return [
|
||||
// 最大上传
|
||||
'maxsize' => '10mb',
|
||||
// 文件保存格式化方法
|
||||
'savename' => '/storage/{topic}/{year}{mon}{day}/{filesha1}{.suffix}',
|
||||
'savename' => '/storage/{topic}/{year}{mon}{day}/{filename}{filesha1}{.suffix}',
|
||||
// 文件格式限制
|
||||
'mimetype' => 'jpg,png,bmp,jpeg,gif,webp,zip,rar,xls,xlsx,doc,docx,wav,mp4,mp3,txt',
|
||||
];
|
Loading…
Reference in New Issue
Block a user