diff --git a/src/components/collections/ViewCollection.jsx b/src/components/collections/ViewCollection.jsx index 799033e5..77bc78fe 100644 --- a/src/components/collections/ViewCollection.jsx +++ b/src/components/collections/ViewCollection.jsx @@ -172,15 +172,15 @@ const ViewCollection = ({ onClose }) => {
{data?.attachments?.map((doc) => { - const isImage = doc.contentType?.includes("image"); + const isImage = doc.contentType?.startsWith("image"); return (
{ if (isImage) { @@ -188,6 +188,8 @@ const ViewCollection = ({ onClose }) => { IsOpen: true, Image: doc.preSignedUrl, }); + } else { + window.open(doc.preSignedUrl, "_blank"); } }} >