DingRui12138 / vue-pdf-viewer

MIT License
17 stars 11 forks source link

Add option to enable download of pdfs using redirected source #15

Closed vileoleone closed 9 months ago

vileoleone commented 10 months ago

Hello,

Currently, I'm utilizing vue-pdf-viewer to download PDFs, and the links provided make requests to my API, which subsequently redirects to an AWS S3 location. The challenge I'm facing is related to visualizing PDFs that originate from redirected requests (status 302). The visualizer opens but the pdf has an empty content.

All authorizations are correct and for the direct link the PdfViewer works correctly.

I did not find anything related in the docs but does the lib per default , blocks content from redirected requests?

vileoleone commented 9 months ago

I had to implement an alternative logic as i gave up the redirection of the link. Instead i made another handler that returns the direct link to the doc so the pdf opens correctly