🐛 修复 s3 存储类型不开启私有空间时,文件路径或文件名包含中文无法直链下载的 bug

This commit is contained in:
zhaojun
2022-07-13 11:08:05 +08:00
parent 28150b0c1a
commit 4fd0b8d442

View File

@@ -58,7 +58,7 @@ public abstract class AbstractS3BaseFileService<P extends S3BaseParam> extends A
// 如果不是私有空间, 且指定了加速域名, 则直接返回下载地址.
if (BooleanUtil.isFalse(param.isPrivate()) && StrUtil.isNotEmpty(domain)) {
return StringUtils.concat(domain, fullPath);
return StringUtils.concat(domain, StringUtils.encodeAllIgnoreSlashes(fullPath));
}
Integer tokenTime = param.getTokenTime();