Skip to content

Commit 5eb8ee1

Browse files
authored
Images do not display well in Angular (#1068)
Issue: 207425
1 parent 8c59bdc commit 5eb8ee1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

common/src/main/java/com/genexus/CommonUtil.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2418,7 +2418,13 @@ public static String getRelativeURL(String path)
24182418

24192419
public static String getRelativeBlobFile(String path)
24202420
{
2421-
return path.replace(com.genexus.ApplicationContext.getInstance().getServletEngineDefaultPath() + File.separator, "").replace(File.separator, "/");
2421+
String servletEngineDefaultPath = com.genexus.ApplicationContext.getInstance().getServletEngineDefaultPath();
2422+
if (!servletEngineDefaultPath.isEmpty() && path.startsWith(servletEngineDefaultPath)) {
2423+
return path.replace(servletEngineDefaultPath + File.separator, "").replace(File.separator, "/");
2424+
}
2425+
else {
2426+
return path;
2427+
}
24222428
}
24232429

24242430
public static final String FORMDATA_REFERENCE = "gxformdataref:";

0 commit comments

Comments
 (0)