R
Reactiflux

snowberb – 09-12 Aug 3

snowberb – 09-12 Aug 3

S⛄Snowberb⛄8/3/2023
If I want to download a PDF file, how can I make the navigator to download it instead of the app itself? What I mean is, right now I have to fetch the pdf, and then I convert it to a link, but once I get the link, the pdf is already dowloaded, what I want is to use the navigator to tell how much time left for the file to download
SScriptyChris8/3/2023
Why don't you put that PDF's link on the <a> in HTML instead of fetching it from JS?
S⛄Snowberb⛄8/3/2023
the pdf is stored in base64
SScriptyChris8/3/2023
So how do you download it now? You can try setting content-diaposition: Attachment HTTP response header for that file to instruct browser to download it when linked is clicked https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
UUUnknown User8/5/2023
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

snowberb – 09-12 Aug 3

Join Server