Skip to content

Commit e1d30e8

Browse files
committed
Improved: improves ImageManagementServices code (OFBIZ-13292)
It's about better code and information in log when uploading several images.
1 parent 2e2f41b commit e1d30e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementServices.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public static Map<String, Object> addMultipleuploadForProduct(DispatchContext dc
8787
Locale locale = (Locale) context.get("locale");
8888

8989
if (UtilValidate.isNotEmpty(uploadFileName)) {
90+
Debug.logInfo("================== This is about file: " + uploadFileName +" ==================", MODULE);
9091
String imageServerPath = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog",
9192
"image.management.path", delegator), context);
9293
String imageServerUrl = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog",
@@ -182,7 +183,7 @@ public static Map<String, Object> addMultipleuploadForProduct(DispatchContext dc
182183
}
183184
}
184185
// Scale Image in different sizes
185-
if (UtilValidate.isNotEmpty(imageResize)) {
186+
else {
186187
fileToCheck = imageServerPath + "/" + productId + "/" + imageName;
187188
File fileOriginal = new File(fileToCheck);
188189
fileOriginal = checkExistsImage(fileOriginal);

0 commit comments

Comments
 (0)