feat: stream file serving (#1865)

This commit is contained in:
Philip Okugbe
2026-01-24 17:54:56 +00:00
committed by GitHub
parent efb0a9317b
commit 98f71c95fe
3 changed files with 12 additions and 8 deletions
@@ -55,7 +55,7 @@ export class ExportController {
throw new ForbiddenException();
}
const zipFileBuffer = await this.exportService.exportPages(
const zipFileStream = await this.exportService.exportPages(
dto.pageId,
dto.format,
dto.includeAttachments,
@@ -70,7 +70,7 @@ export class ExportController {
'attachment; filename="' + encodeURIComponent(fileName) + '"',
});
res.send(zipFileBuffer);
res.send(zipFileStream);
}
@UseGuards(JwtAuthGuard)
@@ -100,6 +100,6 @@ export class ExportController {
'"',
});
res.send(exportFile.fileBuffer);
res.send(exportFile.fileStream);
}
}