You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/09/13 14:27:27 UTC
[GitHub] [fineract] BLasan commented on a diff in pull request #2592: FINERACT-1743: Introduce Lombok to documentmanagement module
BLasan commented on code in PR #2592:
URL: https://github.com/apache/fineract/pull/2592#discussion_r969691535
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java:
##########
@@ -153,16 +153,16 @@ public Response retrieveImage(@PathParam("entity") final String entityName, @Pat
// text
if ("application/octet-stream".equalsIgnoreCase(acceptHeader)
|| (output != null && (output.equals("octet") || output.equals("inline_octet")))) {
- return ContentResources.fileDataToResponse(resizedImage, resizedImage.name() + ImageFileExtension.JPEG,
+ return ContentResources.fileDataToResponse(resizedImage, resizedImage.getFileName() + ImageFileExtension.JPEG,
"inline_octet".equals(output) ? "inline" : "attachment");
}
// Else return response with Base64 encoded
// TODO: Need a better way of determining image type
String imageDataURISuffix = ContentRepositoryUtils.ImageDataURIsuffix.JPEG.getValue();
- if (StringUtils.endsWith(imageData.name(), ContentRepositoryUtils.ImageFileExtension.GIF.getValue())) {
+ if (StringUtils.endsWith(imageData.getFileName(), ContentRepositoryUtils.ImageFileExtension.GIF.getValue())) {
Review Comment:
Is `imageData` null safe?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org