Linked Questions
75 questions linked to/from JavaScript blob filename without link
0 votes
0 answers
69 views
How to download Promise<Blob> with browser instead of Javascript [duplicate]
I am getting my file from firebase server by getBlob(ref(this.str, `xxx.xx`)); // returns Promise<Blob> but just calling it directly, it will get downloaded as an internal file How do I do it ...
814 votes
31 answers
1.1m views
How to export JavaScript array info to csv (on client side)?
I know there are lot of questions of this nature but I need to do this using JavaScript. I am using Dojo 1.8 and have all the attribute info in array, which looks like this: [["name1", "city_name1", ....
273 votes
32 answers
726k views
How do I download a file with Angular2 or greater
I have a WebApi / MVC app for which I am developing an angular2 client (to replace MVC). I am having some troubles understanding how Angular saves a file. The request is ok (works fine with MVC, and ...
64 votes
10 answers
310k views
Failed to execute 'atob' on 'Window'
I'm trying to save my HTML file in Chrome when the user presses ctrl + s keys but Chrome is crashed. (I want to download just the source code of my HTML file) I read that it happens because my file ...
47 votes
4 answers
74k views
Why threre is no way to download file using ajax request?
In our application we need to implement following scenario: A request is send from client Server handles the request and generates file Server returns file in response Client browser displays file ...
36 votes
7 answers
136k views
Spring - download response as a file
I am writing application using AngularJS and Spring. I would like to send request to the server and download response returned from controller as a file. In controller I have content of csv file (as ...
26 votes
2 answers
116k views
How do I save a file getting downloaded from server using react?
I have one backend API which basically downloads a template whenever we call it. I have provided a href on my html page hence whenever someone click on that href, it calls backend API and that file ...
13 votes
3 answers
25k views
Typescript blob filename without link
How to set file name for blob in typescript? For IE, I can setup file name easily but for Chrome it looks impossible. Basically I need something similar to this solution but with typescript ...
12 votes
3 answers
48k views
Creating Javascript Blob() with data from HTML Element. Then downloading it as a text file
I'm using an HTML5 site to create a log per-say within a textarea element. I need to pull the data from that area with the click of a button, and download it to my computer via a .txt file. How would ...
18 votes
3 answers
56k views
set a Blob as the "src" of an iframe
The following code work perfectly in Chrome <script> function myFunction() { var blob = new Blob(['<a id="a"><b id="b">hey!</b></a>'], {type : 'text/html'}); var newurl =...
5 votes
2 answers
3k views
JS built CSV breaking after # in Excel
I'm building CSVs via JavaScript and some of the cell values contain hashtags and other special characters. I have noticed in particular that the hashtags act as a hard stop for the file. I have not ...
3 votes
2 answers
13k views
Angular - Save blob in local text file?
I have a plain text variable which I want to store and save on a .txt file using Angular. So far I have tried the following: var data = new Blob([text], {type: 'text/plain'}); const url= window.URL....
2 votes
2 answers
14k views
Download PDF from javascript blob, without replacing the open page
I have a PDF being generated in the browser, and converted to a blob object. The "traditional" method of downloading this by using javascript to inject an a tag (example code below) opens ...
9 votes
4 answers
14k views
Is there a way to set a file name when jspdf output()
My site draws a column chart. I have a button to save it as a PDF file showing it before saving. The way it works now is this. google.visualization draws the chart. html2canvas takes a screenshot of ...
6 votes
1 answer
19k views
How to set the download file extension for blob data
In my site video use the blob data, when the video was downloaded, the saved filename is the blob name with .txt(4671addc-3ce0-4eb6-b414-ddf3406b1fe5.txt) extension in Chrome borwser, while in firefox ...