|
|
|
@ -56,7 +56,15 @@ class Fileslistitem extends Component{
|
|
|
|
|
},
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result.data.attachment_histories.length===0){
|
|
|
|
|
this.downloadfiles(result.data.url)
|
|
|
|
|
let link = document.createElement('a');
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
link.href = result.data.url;
|
|
|
|
|
link.download = result.data.title;
|
|
|
|
|
//兼容火狐浏览器
|
|
|
|
|
let evt = document.createEvent("MouseEvents");
|
|
|
|
|
evt.initEvent("click", false, false);
|
|
|
|
|
link.dispatchEvent(evt);
|
|
|
|
|
document.body.removeChild(link);
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
Showoldfiles:true,
|
|
|
|
|