mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 08:38:37 +00:00
fix: remove /download from attachments (#1067)
This commit is contained in:
@@ -27,7 +27,7 @@ export default function AttachmentActions({ attachment }: Props) {
|
|||||||
|
|
||||||
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;
|
||||||
|
|
||||||
const filesize = determineFileSize(size);
|
const filesize = determineFileSize(size);
|
||||||
|
|
||||||
|
|||||||
@@ -288,11 +288,7 @@ export default function ContextMenus() {
|
|||||||
window.open(
|
window.open(
|
||||||
// ! FIXME: do this from revolt.js
|
// ! FIXME: do this from revolt.js
|
||||||
client
|
client
|
||||||
.generateFileURL(data.attachment)
|
.generateFileURL(data.attachment),
|
||||||
?.replace(
|
|
||||||
"attachments",
|
|
||||||
"attachments/download",
|
|
||||||
),
|
|
||||||
isFirefox || window.native ? "_blank" : "_self",
|
isFirefox || window.native ? "_blank" : "_self",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user