mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 18:15:28 +00:00
fix: assume attachment URL is volatile
This commit is contained in:
@@ -25,9 +25,9 @@ export default function AttachmentActions({ attachment }: Props) {
|
|||||||
const client = useContext(AppContext);
|
const client = useContext(AppContext);
|
||||||
const { filename, metadata, size } = attachment;
|
const { filename, metadata, size } = attachment;
|
||||||
|
|
||||||
const url = client.generateFileURL(attachment)!;
|
const url = client.generateFileURL(attachment);
|
||||||
const open_url = `${url}/${filename}`;
|
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);
|
const filesize = determineFileSize(size);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user