MS Edge does not add extension
Closed this issue · 4 comments
pavterenin commented
download(blob, fileName);
blob.type = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
All browsers download the file with .xlsx extension, except Edge. Edge just downloads file with fileName without any extension.
roberto-slopez commented
This works for me:
download( resp.responseBytes, 'file.xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
nuthinking commented
I got a similar problem in Electron on Windows: #91
fkm commented
There's a compatibility note on MDN:
Edge 17 or older didn't follow the attributes' value to determine filename (bug 7260192).
Does anyone have an idea for a workaround?
[EDIT] This works https://github.com/eligrey/FileSaver.js
rndme commented
Newer versions of edge should work just fine.