0

From express, response.download method streams the file or reads entire file into a memory and send it to ui.

Krish Lakshmanan
  • 760
  • 7
  • 13

1 Answers1

0

From the docs,

When an error occurs or transfer is complete, the method calls the optional callback function fn. This method uses res.sendFile() to transfer the file.

And as you can read more about here in this excellent answer, that method streams the data.

rb612
  • 5,280
  • 3
  • 30
  • 68