ProgrammerBR
-
Posts
5 -
Joined
-
Last visited
Community Answers
-
ProgrammerBR's post in How to download a PDF file instead of saving it was marked as the answer
The problem was the front-end, I fixed it using this:
.then((response) => { const url = window.URL.createObjectURL(new Blob([response.data])); const link = document.createElement('a'); link.href = url; link.setAttribute('download', type + '_'+month'_'+ year +'.pdf'); document.body.appendChild(link); link.click(); })
-
ProgrammerBR's post in How to download a file instead of saving in a directory was marked as the answer
The problem was the front-end, I fixed it using this:
.then((response) => { const url = window.URL.createObjectURL(new Blob([response.data])); const link = document.createElement('a'); link.href = url; link.setAttribute('download', type + '_'+month'_'+ year +'.pdf'); document.body.appendChild(link); link.click(); })