Answer the question
In order to leave comments, you need to log in
How to download pdf file from server using angular?
With the help of $http using the POST method, I make a request to the server where a pdf file is generated for me. How can I force Angular to download what it generated for me?
Answer the question
In order to leave comments, you need to log in
Why the hell do you need to hang unnecessary things on the frontend?
This is a purely server task, send a request, accept a response, recognize and process.
It is more correct for the server to specify the header 'Content-Disposition: attachment; filename="name.pdf", which will force the files not to be opened, but to be downloaded. And in the browser "go" to the url to the file using location
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question