mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
修改配置文件设置文件大小优化
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user