Skip to content

Commit

Permalink
Merge pull request #152 from Olog/CSSTUDIO-2373-fix-display-images
Browse files Browse the repository at this point in the history
CSSTUDIO-2373: fix images not displayed in some cases
  • Loading branch information
cjenkscybercom authored May 27, 2024
2 parents a2ffc98 + 0ba05a5 commit 49c3373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Attachment/AttachmentImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const isImage = (attachment) => {
if(attachment.file) {
return attachment?.file?.type?.toLowerCase()?.startsWith("image");
} else {
return attachment.fileMetadataDescription === "image";
return attachment.fileMetadataDescription?.toLowerCase()?.startsWith("image");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class OlogAttachment{
}
this.url = URL.createObjectURL(file);
}
if(this.fileMetadataDescription === "image") {
if(this.fileMetadataDescription?.toLowerCase()?.startsWith("image")) {
this.isImage = true;
}
}
Expand Down

0 comments on commit 49c3373

Please sign in to comment.