Skip to content

Instantly share code, notes, and snippets.

View shibinarakkan's full-sized avatar

shibinarakkan

View GitHub Profile
@shibinarakkan
shibinarakkan / download.js
Created January 8, 2020 10:24
download file javascript
axios.post('link , {
token: "",
}, {
responseType: 'blob'
}).then(rsp => {
console.log(rsp);
let blob = new Blob([rsp.data]);
function download(filename, data) {
var element = document.createElement('a');
element.href = URL.createObjectURL(blob);