diff --git a/src/components/common/messaging/attachments/AttachmentActions.tsx b/src/components/common/messaging/attachments/AttachmentActions.tsx index daba3f7a..cd875061 100644 --- a/src/components/common/messaging/attachments/AttachmentActions.tsx +++ b/src/components/common/messaging/attachments/AttachmentActions.tsx @@ -25,9 +25,9 @@ export default function AttachmentActions({ attachment }: Props) { const client = useContext(AppContext); const { filename, metadata, size } = attachment; - const url = client.generateFileURL(attachment)!; + const url = client.generateFileURL(attachment); const open_url = `${url}/${filename}`; - const download_url = url.replace("attachments", "attachments/download"); + const download_url = url?.replace("attachments", "attachments/download"); const filesize = determineFileSize(size);