Skip to content

Commit 8ecd28f

Browse files
committed
Image API was not working when Blob was used.
Issue: 94268
1 parent d2c920b commit 8ecd28f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/src/main/java/com/genexus/GxImageUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ public class GxImageUtil {
1414
private static Logger log = org.apache.logging.log4j.LogManager.getLogger(GxImageUtil.class);
1515

1616
private static String getImageAbsolutePath(String imageFile){
17-
return com.genexus.ModelContext.getModelContext().getHttpContext().getDefaultPath() + imageFile.replace("/", File.separator);
17+
String defaultPath = com.genexus.ModelContext.getModelContext().getHttpContext().getDefaultPath();
18+
return imageFile.startsWith(defaultPath)? imageFile : defaultPath + imageFile.replace("/", File.separator);
1819
}
1920

2021
public static long getFileSize(String imageFile){

0 commit comments

Comments
 (0)