diff --git a/src/app/(frontend)/intelligence/missions/actions.ts b/src/app/(frontend)/intelligence/missions/actions.ts index 07f31ae..4706cee 100644 --- a/src/app/(frontend)/intelligence/missions/actions.ts +++ b/src/app/(frontend)/intelligence/missions/actions.ts @@ -205,6 +205,15 @@ export async function uploadSideOpModlist( if (file.size > 10 * 1024 * 1024) { return { success: false, error: "Mod list file must be 10 MB or smaller." }; } + // Only HTML mod lists exported from the Arma 3 launcher are supported. Some + // browsers report an empty file.type, so also accept by extension. + const isHtml = file.type === "text/html" || /\.html?$/i.test(file.name); + if (!isHtml) { + return { + success: false, + error: "Mod list must be an HTML file exported from the Arma 3 launcher.", + }; + } const buffer = Buffer.from(await file.arrayBuffer()); const created = await payload.create({