1.0.2 • Published 1 year ago
get-file-using-a-tag v1.0.2
Get file(Download) using a tag
Install
# npm
$ npm install get-file-using-a-tag
# yarn
$ yarn add get-file-using-a-tag
# pnpm
$ pnpm add get-file-using-a-tag
Usage
import download from 'get-file-using-a-tag';
// If you have ArrayBuffer
download({
fileName: 'your-file-name.txt',
arrayBuffer: yourArrayBuffer,
mimeType: 'application/octet-stream', // optional
});
// If you have Blob
download({
fileName: 'your-file-name.txt',
blob: yourBlob,
});