fix: assume attachment URL is volatile

This commit is contained in:
Paul Makles 2022-01-04 13:40:52 +00:00
parent fc91a75acb
commit 0609b40f81

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