fix: install from app key

This commit is contained in:
2024-12-04 21:55:17 +08:00
parent a5d0e66b3c
commit b2d968b70d
5 changed files with 53 additions and 46 deletions

View File

@@ -154,6 +154,7 @@ router.get('/api/micro-app/download/:id', async (req, res) => {
return;
}
res.setHeader('Content-Disposition', `attachment; filename="${encodeURIComponent(fileName)}"`);
res.setHeader('app-key', file.data?.key || id);
res.writeHead(200, { 'Content-Type': 'application/octet-stream' });
try {
const stream = await minioClient.getObject(bucketName, objectName);