dev_forum
杨树林 5 years ago
parent 5bdc740aa6
commit dfc6d44ae8

@ -1417,7 +1417,7 @@ class Listofworks extends Component {
console.log(Base64.decode(response.headers['content-disposition'].split('=')[1])); console.log(Base64.decode(response.headers['content-disposition'].split('=')[1]));
const string = response.headers['content-disposition'].split('=')[1]; const string = response.headers['content-disposition'].split('=')[1];
var index=string.lastIndexOf("\."); var index=string.lastIndexOf("\.");
const name=obj.substring(0,index); const name=string.substring(0,index);
console.log(Base64.decode(name)); console.log(Base64.decode(name));
downloadElement.href = href downloadElement.href = href
downloadElement.download = Base64.decode(name)+".xlsx"; downloadElement.download = Base64.decode(name)+".xlsx";

Loading…
Cancel
Save