How to Create Zip files by using JSZIP library

JS Zip is an open-source and free library to easily create Zip files without any pain which provides an easy and good API. You can use this library in your app to build easily Zip files. You can use this library when you want your users to download their data, like their images, their videos, their documents, and their other data.


You can download the package by:


With npm : npm install jszip

With bowerbower install Stuk/jszip

With component : component install Stuk/jszip

Manuallydownload JSZip and include the file dist/jszip.js or dist/jszip.min.js


Let’s create an example:


Import JSZIP:


var JSZip = require("jszip");


Create instance: 


var zip = new JSZip();


Basically there are two main functions that make this open-source framework awesome, They are .file(name, content) and .folder(name). These methods return the instance of the functions so you can run the chains on it. Now let’s add a file to it:


zip.file("hello.txt", "Hello[p my)6cxsw2q");


Creating a folder


var photoZip = zip.folder("photos");

photoZip.file("README", "a folder with photos");

The above method will create a foler called photos that will save a file inside photos folder. Here is a example demo: https://jsfiddle.net/c0jmn85o/4/.

how-to-setup-backend-environment-in-ubuntu-1804

How to setup back-end environment in Ubuntu 18.04

When working back end development you usually work with languages such as, Node JS, Php, Python, Ruby, Java etc. You have to seutp the development environment for these languages. With the help of this article you setup backend development environment on your Ubuntu 18.04 machine.

how-to-create-zip-files-by-using-jszip-library

How to Create Zip files by using JSZIP library

JS Zip is an open-source and free library to easily create Zip files without any pain which provides an easy and good API. You can use this library in your app to build easily Zip files. You can use this library when you want your users to download their data, like their images, their videos, their documents, and their other data.

a-brief-introduction-to-microservices-apps

A brief Introduction to Microservices Apps

Microservice apps, or simply microservices, is a method of developing software systems that tries on building single-function modules with interfaces and operations. The trend has grown popular in recent years as Enterprises look to become more Agile and move towards DevOps and continuous testing.

Contributors

Ilyas Karim
Contributor
Fayyaz Karim
Contributor