mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-13 18:59:22 -05:00
fix: assume attachment URL is volatile
This commit is contained in:
parent
fc91a75acb
commit
0609b40f81
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue