!807 文件路径url中文解码问题

Merge pull request !807 from ccran/master
This commit is contained in:
芋道源码 2023-12-29 14:19:48 +00:00 committed by Gitee
commit b1be080e2f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.file;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
@ -70,7 +71,8 @@ public class FileController {
if (StrUtil.isEmpty(path)) {
throw new IllegalArgumentException("结尾的 path 路径必须传递");
}
// 解码
path = URLUtil.decode(path);
// 读取内容
byte[] content = fileService.getFileContent(configId, path);
if (content == null) {