refactor: 修复下载附件特殊符号问题
This commit is contained in:
@@ -89,7 +89,8 @@ public class FileController {
|
|||||||
throw new IllegalArgumentException("结尾的 path 路径必须传递");
|
throw new IllegalArgumentException("结尾的 path 路径必须传递");
|
||||||
}
|
}
|
||||||
// 解码,解决中文路径的问题 https://gitee.com/zhijiantianya/agt-cloud/pulls/807/
|
// 解码,解决中文路径的问题 https://gitee.com/zhijiantianya/agt-cloud/pulls/807/
|
||||||
path = URLUtil.decode(path);
|
// 特殊处理,"+"会变成空格
|
||||||
|
path = URLUtil.decode(path.replace("+", "%2B"));
|
||||||
|
|
||||||
// 读取内容
|
// 读取内容
|
||||||
byte[] content = fileService.getFileContent(configId, path);
|
byte[] content = fileService.getFileContent(configId, path);
|
||||||
|
|||||||
Reference in New Issue
Block a user