Posts

Showing posts with the label client-side

FileSaver.js with a dialog

Image
Clash Royale CLAN TAG #URR8PPP FileSaver.js with a dialog I am using the FileSaver.js to download file using the code below. This file is automatically downloaded to a default folder (Tested in Chrome), but I need to show a window dialog that says something like "Save as file...". Thanks! var blob = new Blob([data], {type: "application/vnd.openxmlformatsofficedocument.spreadsheetml.sheet"}); saveAs(blob, "file.xlsx"); 2 Answers 2 This dialog you are talking about is browser settings specific. Meaning in Google Chrome for example in Settings/Advanced/Downloads section you have a setting: Settings/Advanced/Downloads Ask where to save each file before downloading which you can set true/false . Ask where to save each file before downloading true/false If you disable this setting it would always ask you and bring the SaveAs dialog. SaveAs Hope this helps. You can use the ...