Skip to content

Download Files as a ZipFile

Muah edited this page Dec 16, 2017 · 20 revisions

currently we have only one way to download files, but when you try to download a multiple items, your machine/device downloads folder quickly becomes a mess.

so to solve that, we now have 2 options for downloading files

  • 1- you can download separate files like normal.
  • 2- download selected files as a .zip file.

if you decided to go with the second option, you will need to install a couple of extra packages "will add about extra 600kb to manager.js file"

yarn add file-saver jszip jszip-utils
// or
npm install file-saver jszip jszip-utils --save

and that's it, we already took care of everything else & if none of those packages is found we will fallback to the default separate file saving.

also to make things easier, the zip file will be named after the current folder name or “media_manager” if you were at the root.


Notes

Test

browser: Chrome v63.0.3239.84 files_no: 24
size: 109.6 MB
time to zip: 1.88 min
zip size: 102.1 MB