I'm using the PptxGenJS library, and one of the functions I'm using it for leads to around 8 powerpoint files being downloaded at once. It works, but it creates a mess, and so putting them into a single zip file would greatly improve the experience.
The issue is that I can't find a way to do this, as there seems to be nothing in PptxGenJS that will let you manipulate a file once it's been created, it just sends it straight as a download.
Is there someway to intercept those downloads, add them to a zip file, and then send that zip to the user?
Pass in
'jszip'
as the first argument ofsave
, a callback, and a jszip file type, like this:If you have more than 2 presentations to file, you'll probably want to use async instead of nested callbacks.