|
@@ -591,7 +591,11 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
if (Objects.equals(attachmentType, SystemConstant.LOCAL)) {
|
|
|
String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
|
|
|
filePath = SystemConstant.getLocalFilePath(hostUrl, filePath);
|
|
|
- url = hostUrl + File.separator + filePath;
|
|
|
+ if (filePath.startsWith("/")) {
|
|
|
+ url = hostUrl + filePath;
|
|
|
+ } else {
|
|
|
+ url = hostUrl + File.separator + filePath;
|
|
|
+ }
|
|
|
} else {
|
|
|
url = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
|
|
|
}
|
|
@@ -615,7 +619,11 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
if (Objects.equals(type, SystemConstant.LOCAL)) {
|
|
|
String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
|
|
|
path = SystemConstant.getLocalFilePath(hostUrl, path);
|
|
|
- pathUrl = hostUrl + File.separator + path;
|
|
|
+ if (path.startsWith("/")) {
|
|
|
+ pathUrl = hostUrl + path;
|
|
|
+ } else {
|
|
|
+ pathUrl = hostUrl + File.separator + path;
|
|
|
+ }
|
|
|
} else {
|
|
|
if (isExpire) {
|
|
|
pathUrl = fileStoreUtil.getPrivateUrl(path, fileStoreUtil.getUploadEnumByPath(path).getFssType());
|
|
@@ -652,7 +660,11 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
if (Objects.equals(attachmentType, SystemConstant.LOCAL)) {
|
|
|
String hostUrl = SystemConstant.getLocalFileHost(dictionaryConfig.sysDomain().getFileHost());
|
|
|
filePath = SystemConstant.getLocalFilePath(hostUrl, filePath);
|
|
|
- pathUrl = hostUrl + File.separator + filePath;
|
|
|
+ if (filePath.startsWith("/")) {
|
|
|
+ pathUrl = hostUrl + filePath;
|
|
|
+ } else {
|
|
|
+ pathUrl = hostUrl + File.separator + filePath;
|
|
|
+ }
|
|
|
} else {
|
|
|
pathUrl = fileStoreUtil.getPrivateUrl(filePath, uploadFileEnum.getFssType());
|
|
|
}
|