change download file name
This commit is contained in:
@ -117,13 +117,14 @@ function Index() {
|
||||
function downloadReport(url) {
|
||||
fetch(url)
|
||||
.then(async response => {
|
||||
console.log(response.headers);
|
||||
//console.log(response.headers);
|
||||
const filename = response.headers
|
||||
.get("content-disposition")
|
||||
.split('"')[1];
|
||||
console.log(filename)
|
||||
// .split('"')[1];
|
||||
const text = await response.text();
|
||||
console.log(filename)
|
||||
console.log(text)
|
||||
//console.log(filename)
|
||||
//console.log(text)
|
||||
//return { filename, text };
|
||||
})
|
||||
.then(responseText => this.download(responseText))
|
||||
|
||||
Reference in New Issue
Block a user