Issue
I have a base64 pdf that I get from local storage I want to be able to download this with vue3 typescript.downloadPDF() { const linkSource = `data:application/pdf;base64,${'json.base64'}`; const downloadLink = document.createElement("a"); const fileName = this.jsonFile.name + ".pdf"; downloadLink.href = linkSource; downloadLink.download = fileName; downloadLink.click(); },error:Network issue when download
Solution
After a few day I founded a way.
I've to add this.json.base64 not only json.base64 in this line below.
const linkSource = `data:application/pdf;base64,${this.json.base64}`;
Answered By - Nawapol R.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.