fix: crash on zip download if zip is larger than 4GB (#709)

This commit is contained in:
Pak Lam (Billy) Lee
2024-12-28 11:37:58 -05:00
committed by GitHub
parent 856c54d5d6
commit bfd4049c15
2 changed files with 4 additions and 3 deletions

View File

@@ -54,13 +54,14 @@ export class FileController {
@Res({ passthrough: true }) res: Response,
@Param("shareId") shareId: string,
) {
const zip = await this.fileService.getZip(shareId);
const zipStream = this.fileService.getZip(shareId);
res.set({
"Content-Type": "application/zip",
"Content-Disposition": contentDisposition(`${shareId}.zip`),
});
return new StreamableFile(zip);
return new StreamableFile(zipStream);
}
@Get(":fileId")