From 282b313cd55f8a4dc98524ca24c3a38be9cfe9a0 Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Mon, 26 Oct 2026 18:07:05 -0400 Subject: [PATCH] fix(modlists): send modlist files as downloads instead of inline views --- src/collections/server/ModLists.ts | 7 +++++++ .../missionMap => markers}/MarkerTypePicker.tsx | 0 .../{intelligence/missionMap => markers}/iconStyle.ts | 0 .../{intelligence/missionMap => markers}/markerIcon.ts | 0 4 files changed, 7 insertions(+) rename src/components/frontend/{intelligence/missionMap => markers}/MarkerTypePicker.tsx (100%) rename src/components/frontend/{intelligence/missionMap => markers}/iconStyle.ts (100%) rename src/components/frontend/{intelligence/missionMap => markers}/markerIcon.ts (100%) diff --git a/src/collections/server/ModLists.ts b/src/collections/server/ModLists.ts index 0d5e9f2e..bb23c714 100644 --- a/src/collections/server/ModLists.ts +++ b/src/collections/server/ModLists.ts @@ -45,5 +45,12 @@ export const ModLists: CollectionConfig = { // "Invalid MIME type: application/xml". The document itself is stored // with the text/html mimetype the action passes. mimeTypes: ["text/html", "application/xml"], + // Payload streams uploads inline by default, so the browser renders the + // preset HTML instead of saving it. Force a download for every link to the + // file (the Discord modlist embed and the web UI both use this URL). + modifyResponseHeaders: ({ headers }) => { + headers.set("Content-Disposition", "attachment"); + return headers; + }, }, }; diff --git a/src/components/frontend/intelligence/missionMap/MarkerTypePicker.tsx b/src/components/frontend/markers/MarkerTypePicker.tsx similarity index 100% rename from src/components/frontend/intelligence/missionMap/MarkerTypePicker.tsx rename to src/components/frontend/markers/MarkerTypePicker.tsx diff --git a/src/components/frontend/intelligence/missionMap/iconStyle.ts b/src/components/frontend/markers/iconStyle.ts similarity index 100% rename from src/components/frontend/intelligence/missionMap/iconStyle.ts rename to src/components/frontend/markers/iconStyle.ts diff --git a/src/components/frontend/intelligence/missionMap/markerIcon.ts b/src/components/frontend/markers/markerIcon.ts similarity index 100% rename from src/components/frontend/intelligence/missionMap/markerIcon.ts rename to src/components/frontend/markers/markerIcon.ts