restifydownload

1.0.3 • Public • Published

Usage

    const rd=require('restifydownload');
    app.use(rd);

    app.get('/test/download',(req, res, next)=>{
        res.download({
            path: '/the/path/of/file',
            name: 'filename',
            type: 'contentType',
            charSet: 'charSet'
        })
    })
    app.get('/test/download2',(req, res, next)=>{
        res.sendFile('filedata',{
            name: 'filename',
            type: 'contentType',
            charSet: 'charSet'
        })
    })

Package Sidebar

Install

npm i restifydownload

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

1.72 kB

Total Files

3

Last publish

Collaborators

  • 456wyc