Skip to content

Commit

Permalink
fix: remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: hxtree <[email protected]>
  • Loading branch information
hxtree committed Oct 23, 2023
1 parent bdce8f8 commit df3e02f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions services/html-to-pdf/src/module/pdf/pdf.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,14 @@ export class PdfController {
res.setHeader('Content-Length', Buffer.byteLength(buffer, 'utf-8'));
res.setHeader('Content-Type', 'application/pdf');
res.setHeader('Content-Disposition', `attachment; filename=${filename}`);
// stream.pipe(res);
return new StreamableFile(stream);
}
/**
* base64 can be responses can be checked using the following
* https://base64.guru/converter/decode/pdf
*/
* base64 can be responses can be checked using the following
* https://base64.guru/converter/decode/pdf
*/
res.setHeader('Content-Type', 'application/json;charset=UTF-8');
// res.status(200).send({
// content: buffer.toString('base64'),
// filename,
// mimeType: 'application/pdf',
// });

return {
content: buffer.toString('base64'),
filename,
Expand Down

0 comments on commit df3e02f

Please sign in to comment.