download pdf file fixes
This commit is contained in:
parent
66f18a7df2
commit
339452e607
3 changed files with 11 additions and 7 deletions
|
|
@ -1526,10 +1526,14 @@ export default {
|
|||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.target = "_blank";
|
||||
link.download =
|
||||
event.getContent().body || this.$t("fallbacks.download_name");
|
||||
link.download = event.getContent().body || this.$t("fallbacks.download_name");
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
URL.revokeObjectURL(url);
|
||||
|
||||
setTimeout(function(){
|
||||
document.body.removeChild(link);
|
||||
URL.revokeObjectURL(url);
|
||||
}, 200)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("Failed to fetch attachment: ", err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue