fix: assume attachment URL is volatile

pull/487/head
Paul Makles 2022-01-04 13:40:52 +00:00
parent fc91a75acb
commit 0609b40f81
1 changed files with 2 additions and 2 deletions

View File

@ -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);