Created
December 18, 2017 15:05
-
-
Save ymdx/10e7985b3a59491f32f5bf2ec5ba75d7 to your computer and use it in GitHub Desktop.
How to download CSV File from HttpResponse with Ajax
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
success: function(data) { | |
var blob=new Blob([data]); | |
var link=document.createElement('a'); | |
link.href=window.URL.createObjectURL(blob); | |
link.download="<FILENAME_TO_SAVE_WITH_EXTENSION>"; | |
link.click(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment