Skip to content

Commit

Permalink
fix: 文件上传回显URL拼接问题 StrUtil.appendIfMissing
Browse files Browse the repository at this point in the history
  • Loading branch information
jskils authored and Charles7c committed May 30, 2024
1 parent 513ea83 commit 7a6cafc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ public void finish() {
});
// 处理本地存储文件 URL
FileInfo fileInfo = uploadPretreatment.upload();
fileInfo.setUrl(URLUtil.normalize(storage.getDomain() + StringConstants.SLASH + fileInfo.getPath() + fileInfo
.getFilename()));
String domain = StrUtil.appendIfMissing(storage.getDomain(), StringConstants.SLASH);
fileInfo.setUrl(URLUtil.normalize(domain + fileInfo.getPath() + fileInfo.getFilename()));
return fileInfo;
}

Expand Down

0 comments on commit 7a6cafc

Please sign in to comment.