src/Leevel/Http/Request.php
public function file(?string $key = null, $defaults = null)
    {
        if (!$key || false === strpos($key, '\\')) {
            return $this->getItem('files', $key, $defaults);
        }

        return $this->files->getArr($key, is_array($defaults) ? $defaults : []);
    }
public function file(?string $key = null, $defaults = null)
    {
        if (!$key || false === strpos($key, '\\')) {
            return $this->getItem('files', $key, $defaults);
        }

        return $this->files->getArr($key, is_array($defaults) ? $defaults : []);
    }
获取文件
数组文件请在末尾加上反斜杆访问.

@param string $key
@param mixed  $defaults

@return null|array|\Leevel\Http\UploadedFile