修改配置文件设置文件大小优化

This commit is contained in:
augushong
2024-10-21 11:20:25 +08:00
parent 6d58f6b70c
commit 044d28bb93
3 changed files with 38 additions and 4 deletions

View File

@@ -36,13 +36,16 @@ class ConfigBase extends AdminController
public function save()
{
$this->checkPostRequest();
$post = $this->request->except(['group_name'], 'post');
$group_name = $this->request->post('group_name');
$storage_bytes_keys = ['upload_allow_size'];
try {
foreach ($post as $key => $val) {
if (in_array($key, $storage_bytes_keys)) {
$val = parse_bytes($val);
}
if (empty($group_name)) {
$this->model
->where('name', $key)