|
|
|
@ -38,14 +38,10 @@ class Fileslistitem extends Component{
|
|
|
|
|
if(result.data.attachment_histories.length===0){
|
|
|
|
|
|
|
|
|
|
let link = document.createElement('a');
|
|
|
|
|
// link.href = window.URL.createObjectURL(new Blob([result.data.url]));
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
link.href = result.data.url;
|
|
|
|
|
let filesname=encodeURIComponent(result.data.title)
|
|
|
|
|
console.log(result.data.title)
|
|
|
|
|
link.download = decodeURIComponent(filesname)
|
|
|
|
|
link.download = result.data.title;
|
|
|
|
|
//兼容火狐浏览器
|
|
|
|
|
console.log(result.data.title)
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
let evt = document.createEvent("MouseEvents");
|
|
|
|
|
evt.initEvent("click", false, false);
|
|
|
|
|
link.dispatchEvent(evt);
|
|
|
|
|