I\'ve built a node/express website for my university project that, after searching for an ID of a law, it shows a big table with all files in different formats and languages
In Express 4 and later, there are 2 helper functions to change the content-type and specify attachment disposition:
res.type("application/octet-stream"); res.attachment("filename.ext");
See docs for type and attachment.