1
0
Fork 0

fix(modlists): send modlist files as downloads instead of inline views

This commit is contained in:
Jason Fraley 2026-10-26 18:07:05 -04:00
parent 134c403b38
commit 282b313cd5
4 changed files with 7 additions and 0 deletions

View file

@ -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;
},
},
};