Skip to content

后台 富文本中 [资源选择器] 上传图片 的 Bug #13

@eKil

Description

@eKil

后台 富文本中 [资源选择器] 上传文件 调用的是 http://localhost:8788/dev/core/system/uploadFile 这个接口

如果在资源选择器中上传图片

plugin\saiadmin\app\controller\SystemController 中的 uploadFile 函数

$logic->uploadBase() 第一个参数写死是 file


会导致下面的代码 $upload = 'file'

plugin\saiadmin\service\storage\UploadService

第36行代码

if ($upload == 'image') {
    if (!in_array($ext, explode(',', $allow_image))) {
        throw new ApiException('不支持该格式的文件上传');
    }
} else {
    if (!in_array($ext, explode(',', $allow_file))) {
        throw new ApiException('不支持该格式的文件上传');
    }
}

会跳到 else 里执行

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions