修复图片显示

This commit is contained in:
wzy-warehouse
2026-06-28 16:44:43 +08:00
parent 4262ec24ad
commit c9cad1e366
@@ -251,7 +251,11 @@ public class IReportOutputServiceImpl implements ReportOutputService {
return files.stream() return files.stream()
.filter(f -> expectedName.equals(f.getFileName())) .filter(f -> expectedName.equals(f.getFileName()))
.findFirst() .findFirst()
.map(f -> (reportProperties.getFiles().getServerUrl() + "/" + f.getFilePath()).replace("\\", "/").replace("//", "/")) .map(f -> {
String server = reportProperties.getFiles().getServerUrl().replaceAll("/+$", "");
String path = f.getFilePath().replace("\\", "/").replaceAll("^/+", "");
return server + "/" + path;
})
.orElse(""); .orElse("");
} }