eligrey / eligrey/FileSaver.js
can I use filesaver.js for ppt, csv, doc, docx, pdf and video?
- Dominant language
- JavaScript
- Stars
- 22k
- Forks
- 4.3k
- PR merge metrics
- No merged PRs in 30d
Description
Filesave.js looks very interesting so thank you for going to the trouble of creating it and maintaining it.
I am having trouble with giving users the ability to download files stored in azure storage.
Some of these files might be ppt, xlsx, video, doc and docx files.
I am currently doing this in my code:
```
xhr.addEventListener('load', (e: ProgressEvent & { target: { response: Blob } }) => {
const fileUrl = window.URL.createObjectURL(e.target.response);
const a = document.createElement('a');
document.body.appendChild(a);
a.setAttribute('style', 'display: none');
a.href = fileUrl;
a.download = file.originalFileName;
a.click();
window.URL.revokeObjectURL(fileUrl);
a.remove();
```
But this does not work in mobile webkit browsers.
Can I use `filesave.js` for this same requirement to stop me going through the pain you look to have solved?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.