Accepted answer
const addUploadCapabilities = requestHandler => (type, resource, params) => {
    if (type === 'UPDATE' && resource === 'posts') {
       //use jszip to zip file here and package it however you need
       // call the API with zipped file
   } return requestHandler(type, resource, params);


let zip = require('jszip')();
//hoping you have already taken input
let input = document.getElementById('fileInput'); // fileInput is id of my input element
let file = input.files[0];
let allZip =  zip.file(, file);

Related Query

More Query from same tag