How to compress files to create a new zip archive in Node.JS

npm install cloudmersive-convert-api-client --save
var CloudmersiveConvertApiClient = require('cloudmersive-convert-api-client');var defaultClient = CloudmersiveConvertApiClient.ApiClient.instance;// Configure API key authorization: Apikeyvar Apikey = defaultClient.authentications['Apikey'];Apikey.apiKey = 'YOUR API KEY';// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)//Apikey.apiKeyPrefix = 'Token';var apiInstance = new CloudmersiveConvertApiClient.ZipArchiveApi();var request = new CloudmersiveConvertApiClient.CreateZipArchiveRequest(); // CreateZipArchiveRequest | Input requestvar callback = function(error, data, response) {if (error) {console.error(error);} else {console.log('API called successfully. Returned data: ' + data);}};apiInstance.zipArchiveZipCreateAdvanced(request, callback);

--

--

--

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Data Handling in Modern ReactJS Environment

The Twin Volcanoes of JavaScript

How to convert any document into a Thumbnail PNG Image in Node.JS

Profit With Programming..💸

Stitching together vanilla React and Next.js with NGINX

Why AngularJS? What’s the use case?

Why redux matters

REDIS NODEJS: EXAMPLE WITH TYPESCRIPT

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

OJET — Proxy to Backend REST API Server

Let’s Understand Classes And Objects ( Instances ) In Programming for Simplicity.

How to get date with different timezone on bash scripts

Integrating Flower with Celery in Django Project Using Docker