Skip to content

Commit

Permalink
fix: final answer
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinBuyck committed Oct 12, 2023
1 parent 1fc6a26 commit 323e32a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sites/public/src/lib/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,10 @@ export const downloadExternalPDF = async (fileURL: string, fileName: string) =>
const url = window.URL.createObjectURL(new Blob([blob]))
const link = document.createElement("a")
link.href = url
link.setAttribute("download", `${fileName}.pdf`)
link.target = "_blank"

link.setAttribute("download", `${fileName}.pdf`)

document.body.appendChild(link)
link.click()
link.parentNode.removeChild(link)
Expand Down

0 comments on commit 323e32a

Please sign in to comment.