fix(modlists): send modlist files as downloads instead of inline views
This commit is contained in:
parent
134c403b38
commit
282b313cd5
4 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue