|
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.file;
|
|
|
|
|
|
import cn.hutool.core.io.IoUtil;
|
|
import cn.hutool.core.io.IoUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
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.CommonResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
@@ -70,6 +71,8 @@ public class FileController {
|
|
if (StrUtil.isEmpty(path)) {
|
|
if (StrUtil.isEmpty(path)) {
|
|
throw new IllegalArgumentException("结尾的 path 路径必须传递");
|
|
throw new IllegalArgumentException("结尾的 path 路径必须传递");
|
|
}
|
|
}
|
|
|
|
+ // 解码,解决中文路径的问题 https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/807/
|
|
|
|
+ path = URLUtil.decode(path);
|
|
|
|
|
|
// 读取内容
|
|
// 读取内容
|
|
byte[] content = fileService.getFileContent(configId, path);
|
|
byte[] content = fileService.getFileContent(configId, path);
|