@chenchunyong/downloadfile

下载文件

Usage no npm install needed!

<script type="module">
  import chenchunyongDownloadfile from 'https://cdn.skypack.dev/@chenchunyong/downloadfile';
</script>

README

download

采用superagent 下载文件,返回promise对象

使用方法

const download = require('@chenchunyong/downloadfile');
download('xxx', 'xxxx').then(() => {
    console.log('下载成功')
}).catch(e => {
    console.log(e);
});