|
@@ -212,15 +212,14 @@ public class FileStoreUtil {
|
|
|
String server = null;
|
|
|
if ("public".equals(type)) {
|
|
|
server = dictionaryConfig.fssPublicDomain().getServer();
|
|
|
- return server + "/" + objectPath;
|
|
|
+ return server + SystemConstant.ORG_SPLIT + objectPath;
|
|
|
} else if ("private".equals(type)) {
|
|
|
Boolean oss = dictionaryConfig.sysDomain().isOss();
|
|
|
- if (Objects.nonNull(oss) && oss && dictionaryConfig.fssPrivateDomain().getConfig().startsWith("oss:") &&
|
|
|
- (dictionaryConfig.fssPrivateDomain().getServer().startsWith("http:") || dictionaryConfig.fssPrivateDomain().getServer().startsWith("https:"))) {
|
|
|
+ if (Objects.nonNull(oss) && oss) {
|
|
|
FileStore fileStore = fileService.getFileStore(type);
|
|
|
return fileStore.getPresignedUrl(objectPath, Duration.ofMinutes(5L));
|
|
|
} else {
|
|
|
- return dictionaryConfig.fssPrivateDomain().getServer() + "/" + objectPath;
|
|
|
+ return dictionaryConfig.fssPrivateDomain().getServer() + SystemConstant.ORG_SPLIT + objectPath;
|
|
|
}
|
|
|
} else {
|
|
|
throw ExceptionResultEnum.ERROR.exception("文件存储store类型不存在");
|
|
@@ -238,11 +237,10 @@ public class FileStoreUtil {
|
|
|
String server = null;
|
|
|
if ("public".equals(type)) {
|
|
|
server = dictionaryConfig.fssPublicDomain().getServer();
|
|
|
- return server + "/" + objectPath;
|
|
|
+ return server + SystemConstant.ORG_SPLIT + objectPath;
|
|
|
} else if ("private".equals(type)) {
|
|
|
Boolean oss = dictionaryConfig.sysDomain().isOss();
|
|
|
- if (Objects.nonNull(oss) && oss && dictionaryConfig.fssPrivateDomain().getConfig().startsWith("oss:") &&
|
|
|
- (dictionaryConfig.fssPrivateDomain().getServer().startsWith("http:") || dictionaryConfig.fssPrivateDomain().getServer().startsWith("https:"))) {
|
|
|
+ if (Objects.nonNull(oss) && oss) {
|
|
|
FileStore fileStore = fileService.getFileStore(type);
|
|
|
if(isExpire) {
|
|
|
return fileStore.getPresignedUrl(objectPath, Duration.ofMinutes(5L));
|
|
@@ -250,7 +248,7 @@ public class FileStoreUtil {
|
|
|
return fileStore.getPresignedUrl(objectPath, Duration.ofMinutes(300L));
|
|
|
}
|
|
|
} else {
|
|
|
- return dictionaryConfig.fssPrivateDomain().getServer() + "/" + objectPath;
|
|
|
+ return dictionaryConfig.fssPrivateDomain().getServer() + SystemConstant.ORG_SPLIT + objectPath;
|
|
|
}
|
|
|
} else {
|
|
|
throw ExceptionResultEnum.ERROR.exception("文件存储store类型不存在");
|