Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mlezcano1985/file-download
An easy way to download a file from the web browser
https://github.com/mlezcano1985/file-download
ajax-request blob download http-request javascript
Last synced: about 2 months ago
JSON representation
An easy way to download a file from the web browser
- Host: GitHub
- URL: https://github.com/mlezcano1985/file-download
- Owner: mlezcano1985
- License: mit
- Created: 2018-10-31T13:14:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-21T20:46:48.000Z (over 5 years ago)
- Last Synced: 2024-10-12T19:09:18.575Z (3 months ago)
- Topics: ajax-request, blob, download, http-request, javascript
- Language: HTML
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# file-save-browser
An easy way to download a file from the web browser
# Install
`npm install file-save-browser`# How to use?
You can see the file **sample.html** with an very easy example.
```
var base64 = ""; // base64 file content
var type = ""; // file content type
var name = ""; // file name with extension
window.FileDownload(base64, type, name)
.then(() => console.log('download successful.'))
.catch((err) => console.error('download error: ', err));
```
# Support
If you are having general issues with this package, feel free to contact me on [Twitter](https://twitter.com/mlezcano1985).
If you believe you have found an issue, please report it using the [GitHub issue tracker](https://github.com/mlezcano1985/file-download/issues), or better yet, fork the repository and submit a pull request.
If you're using this package, I'd love to hear your thoughts. Thanks!