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
- Add
nuxt-secure-files
dependency to your project:
npm install nuxt-secure-files
- Add
nuxt-secure-files
module tonuxt.config.js
:
export default {
// ...other config options
modules: ["nuxt-secure-files"];
}
- (Optional) TypeScript support. Add
nuxt-secure-files
to thetypes
section oftsconfig.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).