fix: remove /download from attachments (#1067)

pull/1142/head
Declan Chidlow 2025-01-29 21:39:17 +08:00 committed by GitHub
parent 97a6c7d399
commit 7750276554
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 7 deletions

View File

@ -27,7 +27,7 @@ export default function AttachmentActions({ attachment }: Props) {
const url = client.generateFileURL(attachment);
const open_url = `${url}/${filename}`;
const download_url = url?.replace("attachments", "attachments/download");
const download_url = url;
const filesize = determineFileSize(size);

View File

@ -288,11 +288,7 @@ export default function ContextMenus() {
window.open(
// ! FIXME: do this from revolt.js
client
.generateFileURL(data.attachment)
?.replace(
"attachments",
"attachments/download",
),
.generateFileURL(data.attachment),
isFirefox || window.native ? "_blank" : "_self",
);
}
@ -1293,4 +1289,4 @@ export default function ContextMenus() {
<CMNotifications />
</>
);
}
}