src/Leevel/Http/FileBag.php
protected function convertFile($file): ?UploadedFile
    {
        if ($file instanceof UploadedFile) {
            return $file;
        }

        $file = $this->normalizeFile($file);

        if (UPLOAD_ERR_NO_FILE === $file['error']) {
            $file = null;
        } else {
            $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error']);
        }

        return $file;
    }
protected function convertFile($file): ?UploadedFile
    {
        if ($file instanceof UploadedFile) {
            return $file;
        }

        $file = $this->normalizeFile($file);

        if (UPLOAD_ERR_NO_FILE === $file['error']) {
            $file = null;
        } else {
            $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error']);
        }

        return $file;
    }
转换上传信息到文件实例 UploadedFile.

@param array|\Leevel\Http\UploadedFile $file

@return null|\Leevel\Http\UploadedFile