Nisha Patel
Problem
I'm building an API on Node.js that receives some parameters and the server generates a PDF file with said parameters and I want the browser to open the generated file.
The file is generated successfully but I don't know how to open the file on the browser that is received as a ReadableStream object.
It's my first time working with ReadableStream so I don't know what the best way to handle this is.
My app.js
My index.html file
I can confirm on my browser that the ReadableStream object is received on the Network tab when opening the DevTools and checking the Response
Solution
You could use Blob - this should get the result you want.
Answered by: >MacHatter1
Credit: >StackOverflow
Blog Links:
>How do I customize controller actions in Laravel Jetstream?
>Run Laravel Project to Active Local Server
>How to show encrypted user id in URL in Laravel?
>How to fix Laravel LiveWire listener?