Questions tagged [filesaver.js]

FileSaver.js implements the HTML5 W3C saveAs() FileSaver interface in browsers that do not natively support it

FileSaver.js is the solution to saving files on the client-side, and is perfect for web applications that need to generate files, or for saving sensitive information that shouldn't be sent to an external server.

316 questions
7
votes
2 answers

Getting Failed to execute 'createObjectURL' on 'URL': Overload resolution failed with npm file-saver

I was developing a angular app to download user details which were uploaded as word document to my local machine using my angular app. I was successfully able to upload it and save it to my DB and i was also able to get its data as byte[] in my…
Nithin Paul
  • 2,169
  • 3
  • 33
  • 55
7
votes
1 answer

How to download a JSON file with JavaScript on iOS Safari

I read a lot about this topic and Safari seems to have issues with that (even filesaver.js). I still wonder whether any of you has an approach that makes it possible for a user to click a button and download a JSON file with a file name to his…
codepleb
  • 10,086
  • 14
  • 69
  • 111
7
votes
1 answer

Angular File-saver: How to prompt the 'Save As' window and not save directly

I am using the file-saver to save a file on client browser. However the file is directly getting downloaded. const blob = new Blob([data.body], {type: 'application/'pdf}); FileSaver.saveAs(blob, 'export.pdf') How to prompt the "Save As" window so…
prabhat gundepalli
  • 907
  • 3
  • 15
  • 39
7
votes
2 answers

Saving base64 image with Filesaver.js

I am getting multiple Base64 URIs of JPG images. I need to save them as jpg files. I'm trying to use FileSaver.js, but its not working for me. I have used filesaver.js before, when I was getting images from aws-sdk, in which, the data was in buffer…
Dushyant Bangal
  • 6,048
  • 8
  • 48
  • 80
7
votes
3 answers

Angular2 FileSaver.js

I'm using FileSaver.js with angular 2 and it works pretty well; however, I'm getting a semantic error in my build: error TS2304: Cannot find name 'saveAs' I'm using the angular 2 seed and added the library to my project.config like…
Bhetzie
  • 2,852
  • 10
  • 32
  • 43
6
votes
3 answers

ExcelJS Not Working In Production in Angular 6

ExcelJS Export Not Working in Angular 6 Production Environment, but works fine in development environment. I am using "exceljs": "^1.13.0" with "file-saver": "^2.0.2". So far I have tried updating: angular.json scripts with…
6
votes
2 answers

FileSaver.js is saving corrupt images

This was working fine and suddenly stopped working. I'm not sure what exactly changed. I need to download multiple images via URLs. I'm using the following code: https://plnkr.co/edit/nsxgwmNYUAVBRaXgDYys?p=preview $http({ method:"GET", …
Dushyant Bangal
  • 6,048
  • 8
  • 48
  • 80
6
votes
1 answer

Download large size files with angular file saver

I have implemented angular file saver into my project with purpose to download files and it works fine for small files, but for files larger then 50mb I see next error and downloading stops after 35-50mb. net::ERR_INCOMPLETE_CHUNKED_ENCODING I have…
antonyboom
  • 1,161
  • 2
  • 17
  • 44
6
votes
1 answer

ignore commas within string in JSON when exporting to csv

I'm exporting json files to csv using Filesaver.js and json-export-excel.js. The comma separator is causing the columns to shift when it sees a comma in the string. Plunker Demo How can i ignore commas found within string?
jashuang1130
  • 429
  • 7
  • 21
6
votes
4 answers

Angular FileSaver with blob and WebAPI . PDF downloaded is blank. But API url returns PDF with content

This is my API for returning a PDF with multiple images . Now when I invoke this with url it perfectly downloads the PDF with images . For eg two pages with images . [HttpGet] public async Task Download(Guid customDocId) { …
Joy
  • 6,438
  • 8
  • 44
  • 75
5
votes
1 answer

Save Excel file from API request using FileSaver in ReactJS

Im my React app, I'm querying an API to retrieve an export of the database under excel format. The call is performed inside my sagas. I then try to save the response of the API with FileSaver const {headers, data} = response; FileSaver.saveAs(new…
Tibo
  • 523
  • 1
  • 8
  • 20
5
votes
1 answer

Angular 7 unable to download file with c# .net core api

I have an angular application where one of the grids has column with hyperlink to a csv file. This csv is on a network drive. When user click the link, they should be able to save file to their machine (assuming all users have access). I am using…
ProgSky
  • 2,530
  • 8
  • 39
  • 65
5
votes
1 answer

Issues with download files in React + .net core api

I am trying to implement a file download on my react app, the API is a .net core api. I am using fileSaver js to implement the front end, but it doesnt seem to save the file properly. My API: [Authorize] [HttpGet] public…
5
votes
0 answers

excel file created by Flask Xlsxwriter is corrupted when sent as response

I am trying to download an Excel file created by XlsxWriter by sending it as a response from Flask view to AngularJS. However, when I try to open the file, it says that the file is corrupted. I do not know what I am missing here. Please find my code…
mia
  • 51
  • 5
5
votes
3 answers

Export contents inside

I am having trouble exporting the contents of a div into a .docx file. I am using FileSaver.js which can be found here: https://github.com/eligrey/FileSaver.js/. My JavaScript Function: function exportNote(){ var blob = new…
btald1331
  • 537
  • 3
  • 8
  • 23
1
2
3
21 22