Skip to content

Commit 7750276

Browse files
fix: remove /download from attachments (#1067)
1 parent 97a6c7d commit 7750276

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/components/common/messaging/attachments/AttachmentActions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function AttachmentActions({ attachment }: Props) {
2727

2828
const url = client.generateFileURL(attachment);
2929
const open_url = `${url}/${filename}`;
30-
const download_url = url?.replace("attachments", "attachments/download");
30+
const download_url = url;
3131

3232
const filesize = determineFileSize(size);
3333

src/lib/ContextMenus.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,7 @@ export default function ContextMenus() {
288288
window.open(
289289
// ! FIXME: do this from revolt.js
290290
client
291-
.generateFileURL(data.attachment)
292-
?.replace(
293-
"attachments",
294-
"attachments/download",
295-
),
291+
.generateFileURL(data.attachment),
296292
isFirefox || window.native ? "_blank" : "_self",
297293
);
298294
}
@@ -1293,4 +1289,4 @@ export default function ContextMenus() {
12931289
<CMNotifications />
12941290
</>
12951291
);
1296-
}
1292+
}

0 commit comments

Comments
 (0)