How can I download a file that is in my server to my machine accessing a page in a nodeJS server?
I\'m using the ExpressJS and I\'ve been trying this:
In Express 4.x, there is an attachment() method to Response:
attachment()
Response
res.attachment(); // Content-Disposition: attachment res.attachment('path/to/logo.png'); // Content-Disposition: attachment; filename="logo.png" // Content-Type: image/png