Filesaver.js: Filename fails in Chrome

Created on 27 Apr 2020  路  4Comments  路  Source: eligrey/FileSaver.js

Chrome on Windows uses filereader and popup, and so ignores filename.

var isWebKit = /AppleWebKit/.test(navigator.userAgent); is true for Chrome on Windows.

// Use download attribute first if possible (#193 Lumia mobile) unless this is a native macOS app
  : 'download' in HTMLAnchorElement.prototype && !isWebKit ? function saveAs(blob, name, opts)

Most helpful comment

I bumped into this same issue and found that the script from the demo page (https://eligrey.com/demos/FileSaver.js/) works fine:

https://cdn.rawgit.com/eligrey/FileSaver.js/5ed507ef8aa53d8ecfea96d96bc7214cd2476fd2/FileSaver.min.js

All 4 comments

I bumped into this same issue and found that the script from the demo page (https://eligrey.com/demos/FileSaver.js/) works fine:

https://cdn.rawgit.com/eligrey/FileSaver.js/5ed507ef8aa53d8ecfea96d96bc7214cd2476fd2/FileSaver.min.js

This is an issue I had and my solution was to pull 1.3.8 and use that version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielbronder picture danielbronder  路  6Comments

meenucoditas picture meenucoditas  路  6Comments

MFEKN picture MFEKN  路  5Comments

Aw3same picture Aw3same  路  7Comments

capaj picture capaj  路  4Comments