This file contains 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
var saveFile = function (url, filename) { | |
var xhr = new XMLHttpRequest(); | |
xhr.responseType = 'blob'; | |
xhr.onload = function () { | |
var a = document.createElement('a'); | |
a.href = window.URL.createObjectURL(xhr.response); // xhr.response is a blob | |
a.download = filename; // Set the file name. | |
a.style.display = 'none'; | |
document.body.appendChild(a); | |
a.click(); |
This file contains 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
# | |
# Place it inside << server { } >> Section | |
# | |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your location block(s): | |
# |