Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.
A conversation about how to enable high-velocity DevOps culture at your Podcast An oral history of Stack Overflow — told by its founding team. Featured on Meta. New responsive Activity page. Linked So after you install FileSaver. We've tried FileSaver. What are you using in the backend? I had to fs.
Spring is our backend. The file is only modified when it gets to Angular, when we inspect the data object. Over the wire it's fine. GET from another Spring server is fine. GET from Postman saves the file to disk and it's uncorrupted. The only time we have trouble is trying to get it download to our Angular client :- — Mike Summers. What version of Angular are you using? Have you logged the data from the response to make sure the data is what you're expecting it to be?
I also noticed you're using. Yes, over the wire the data is a pdf file, save it to disk and Acrobat opens it without a problem. Show 5 more comments. Lucas Lucas 8, 5 5 gold badges 37 37 silver badges 48 48 bronze badges. Thank you but the first option doesn't force the download — Mario. Just edit the a tag in the 2. No one should use the second option, its a very heavy to use option.
Simple way to do this with Javascript Daniel Brooks Daniel Brooks 4 4 silver badges 10 10 bronze badges. If the file is too big like 4M chars it gives error — canbax. Ehsan Ahmadi Ehsan Ahmadi 9 9 silver badges 12 12 bronze badges. I found this solution from the sourcecode of how Chrome takes full-page screenshots.
Sentient Sentient 2 2 gold badges 8 8 silver badges 15 15 bronze badges. I know you didn't write this. And I'm willing to believe it works. Creating a virtual link and then doing a virtual click?
Seems really hacky. TravisBear It's all right here: source. Amit Gandole Amit Gandole 6 6 silver badges 16 16 bronze badges. Attackers currently on js.
In my Angular App, I am getting the base 64 files from server. I don't know whether am late to answer this, but I think the better solution could be this. If you have any tips let me know, thanks again! Thank you so much. Don't need to decode base You can send header with binary file. Leocanis Leocanis 1 1 silver badge 8 8 bronze badges. This solution works flawless and saved my life! Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name.
0コメント