Created
January 15, 2019 13:02
-
-
Save rohanBagchi/7c0901dcdb4840d5b7b2df253915a87a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.get('/download', function(req, res) { | |
res.set('Content-Disposition', 'attachment; filename=Some Fancy Data.xls') | |
res.set('Access-Control-Expose-Headers', 'Content-Disposition,X-Suggested-Filename') | |
res.json(downloadData); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment