refactor: 修复下载附件特殊符号问题

This commit is contained in:
caiyuchao committed 2025-10-09 18:32:34 +08:00
1 parent 4f02dbb1e2
commit 992583038b
1 file changed
+2 -1
@@ -89,7 +89,8 @@ public class FileController {
throw new IllegalArgumentException("结尾的 path 路径必须传递");
}
// 解码,解决中文路径的问题 https://gitee.com/zhijiantianya/agt-cloud/pulls/807/
path = URLUtil.decode(path);
// 特殊处理,"+"会变成空格
path = URLUtil.decode(path.replace("+", "%2B"));
// 读取内容
byte[] content = fileService.getFileContent(configId, path);