feat(api): name the file qrcode.[format] to match the front-end naming
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user