🎨 Simplify header setting for file download response

This commit is contained in:
2026-01-28 18:58:50 +00:00
parent 76f42cacc7
commit 8b4cadf3c4

View File

@@ -236,10 +236,7 @@ router.get('/download/:filename', (req, res) => {
return res.status(404).json({ error: 'File not found' });
}
res.setHeader(
'Content-Disposition',
`attachment; filename="${filename}"`
);
res.setHeader('Content-Disposition', `attachment; filename="${filename}"`);
res.setHeader('Content-Type', 'application/json');
res.sendFile(filepath);
});