1.0.2-alpha • Published 3 years ago

nuxt-secure-files v1.0.2-alpha

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

nuxt-secure-files

Embed images and download files securely via API requests

Main features

  • Download Base64 files
  • Directive for embedding images (WIP)
  • TypeScript support

Setup

  1. Add nuxt-secure-files dependency to your project:
npm install nuxt-secure-files
  1. Add nuxt-secure-files module to nuxt.config.js:
export default {
  // ...other config options
  modules: ["nuxt-secure-files"];
}
  1. (Optional) TypeScript support. Add nuxt-secure-files to the types section of tsconfig.json:
{
  "compilerOptions": {
    "types": ["nuxt-secure-files"]
  }
}

Usage

{
  methods: {
    downloadFile() {
        this.$secDownload('/api/file/xx', 'file_xx.pdf');
    }
  }
}

License

See the LICENSE file for license rights and limitations (MIT).