|
|
|
@ -38,16 +38,16 @@ class Fileslistitem extends Component{
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
|
|
|
|
|
if(result.data.attachment_histories.length===0){
|
|
|
|
|
result.blob().then(blob => {
|
|
|
|
|
const aLink = document.createElement('a');
|
|
|
|
|
document.body.appendChild(aLink);
|
|
|
|
|
aLink.style.display='none';
|
|
|
|
|
const objectUrl = window.URL.createObjectURL(blob.data.url);
|
|
|
|
|
aLink.href = objectUrl;
|
|
|
|
|
aLink.download =blob.data.title;
|
|
|
|
|
aLink.click();
|
|
|
|
|
document.body.removeChild(aLink);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const aLink = document.createElement('a');
|
|
|
|
|
document.body.appendChild(aLink);
|
|
|
|
|
aLink.style.display='none';
|
|
|
|
|
const objectUrl = window.URL.createObjectURL(result.data.url);
|
|
|
|
|
aLink.href = objectUrl;
|
|
|
|
|
aLink.download =result.data.title;
|
|
|
|
|
aLink.click();
|
|
|
|
|
document.body.removeChild(aLink);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|