Skip to content

Commit

Permalink
Fix file name
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Apr 11, 2024
1 parent 4f107ca commit da22682
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion template-api/src/v1/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ export async function generateTemplate(body: unknown): Promise<Response> {
}
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}"`
}
})
}
Expand Down

0 comments on commit da22682

Please sign in to comment.