README
my-project
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Lints and fixes files
npm run lint
Customize configuration
Documentation for multiple file download functionality(Zip File)
Overview: This document describes the way to use the download Zip file component in a Vuejs project anywhere,without any dependencies.You can simply import this component anywhere in your project and register it by passing the object consisting of urls and the document details.
Requirements: Vue: ^2.0.0 Jszip: ^3.5.0 jszip-utils:^0.1.0 File-saver: ^1.3.8
Installation: npm install jszip-utils: A library for creating, reading and editing .zip files with JavaScript, with a lovely and simple API. npm install jszip: A collection of cross-browser utilities to go along with JSZip. npm install file-saver --save: FileSaver.js is the solution to saving files on the client-side, and is perfect for web apps that generates files on the client
Usage: While registering the component anywhere in the project,you simply have to pass the dynamic props Object to the registered component. This Object should contain the following: The array consisting of the document URLs and their names/file names (files to be downloaded). The zipFileName you need to give once,the zip file is downloaded. Some naming conventions: fileObject: Object consisting of the document URLs and the zip file name. fileArray1: Array consisting of document URLs and file names. zipFileName:The name you want to give to your zip file,once it is downloaded.
Example: