naming improvements, stopped storing files by name on server

This commit is contained in:
Abhinav Adduri 2017-05-30 16:34:00 -07:00
parent 1800f87065
commit 2d2f2efe91
5 changed files with 12 additions and 9 deletions

View file

@ -44,11 +44,13 @@ function download() {
var downloadUrl = URL.createObjectURL(blob);
var a = document.createElement("a");
a.href = downloadUrl;
a.download = xhr.getResponseHeader('Content-Disposition').match(/filename="(.+)"/)[1];;
a.download = xhr.getResponseHeader('Content-Disposition').match(/filename="(.+)"/)[1];
console.log(xhr.getResponseHeader('Content-Disposition'));
document.body.appendChild(a);
a.click();
})
.catch(function(err){
alert('This link is either invalid or has expired.');
console.error(err);
});
})