xiaofei vor 1 Jahr
Ursprung
Commit
9e917aafb1

+ 5 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/FileStoreUtil.java

@@ -224,7 +224,11 @@ public class FileStoreUtil {
                 FileStore fileStore = fileService.getFileStore(type);
                 return fileStore.getPresignedUrl(objectPath, Duration.ofMinutes(5L));
             } else {
-                return dictionaryConfig.fssPrivateDomain().getServer() + SystemConstant.ORG_SPLIT + objectPath;
+                if (objectPath.startsWith(SystemConstant.ORG_SPLIT)) {
+                    return dictionaryConfig.fssPrivateDomain().getServer() + objectPath;
+                } else {
+                    return dictionaryConfig.fssPrivateDomain().getServer() + SystemConstant.ORG_SPLIT + objectPath;
+                }
             }
         } else {
             throw ExceptionResultEnum.ERROR.exception("文件存储store类型不存在");