feat(api): name the file qrcode.[format] to match the front-end naming

This commit is contained in:
2026-02-21 16:25:20 +01:00
parent c4c165edab
commit 09ef185d89

View File

@@ -22,5 +22,9 @@ export default defineEventHandler(async (event) => {
const image = canvas.toBuffer(format);
event.node.res.setHeader("Content-Type", `image/${format}`);
event.node.res.setHeader(
"Content-Disposition",
`filename="qrcode.${format}"`,
);
return image;
});