Skip to content

Commit cfee306

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

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +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);
90+
Debug.logInfo("================== This is about file: " + uploadFileName + " ==================", MODULE);
9191
String imageServerPath = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog",
9292
"image.management.path", delegator), context);
9393
String imageServerUrl = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog",
@@ -181,9 +181,7 @@ public static Map<String, Object> addMultipleuploadForProduct(DispatchContext dc
181181
return ServiceUtil.returnError(UtilProperties.getMessage(RES_ERROR,
182182
"ProductImageViewUnableWriteBinaryData", UtilMisc.toMap("fileName", file.getAbsolutePath()), locale));
183183
}
184-
}
185-
// Scale Image in different sizes
186-
else {
184+
} else { // Scale Image in different sizes
187185
fileToCheck = imageServerPath + "/" + productId + "/" + imageName;
188186
File fileOriginal = new File(fileToCheck);
189187
fileOriginal = checkExistsImage(fileOriginal);

0 commit comments

Comments
 (0)