diff --git a/java/src/main/java/com/genexus/GxImageUtil.java b/java/src/main/java/com/genexus/GxImageUtil.java index 9c831a32e..e6bd325fb 100644 --- a/java/src/main/java/com/genexus/GxImageUtil.java +++ b/java/src/main/java/com/genexus/GxImageUtil.java @@ -51,7 +51,7 @@ public static long getFileSize(String imageFile){ if (imageFile.toLowerCase().startsWith("http://") || imageFile.toLowerCase().startsWith("https://") || (httpContext.isHttpContextWeb() && imageFile.startsWith(httpContext.getContextPath()))){ try { - URL url = new URL(imageFile); + URL url = new URL(GXDbFile.pathToUrl(imageFile, httpContext)); URLConnection connection = url.openConnection(); return Long.parseLong(connection.getHeaderField("Content-Length")); } catch (Exception e) {