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