From da226820098b41c18bddc6671acece7a37fa4c45 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 11 Apr 2024 12:59:59 +0000 Subject: [PATCH] Fix file name --- template-api/src/v1/generate.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template-api/src/v1/generate.ts b/template-api/src/v1/generate.ts index f6803c40..db1042ac 100644 --- a/template-api/src/v1/generate.ts +++ b/template-api/src/v1/generate.ts @@ -93,11 +93,12 @@ export async function generateTemplate(body: unknown): Promise { } await generator.generateTemplate(options) let content = await zip.generateAsync({ type: "uint8array" }) + const filename = `${modid}-template-${minecraftVersion}.zip` return new Response(content, { status: 200, headers: { "Content-Type": "application/zip", - "Content-Disposition": `attachment; filename="${data.modName}.zip"` + "Content-Disposition": `attachment; filename="${filename}"` } }) }