Zipper

Interactive Playground

Test the Zipper API with custom configurations and see it in action

Configuration

Array of objects with url and name properties. Property names must use double quotes.

Generated Code

import { downloadZipFile } from '@diegoaltoworks/zipper';

const files = [
  {
    "url": "/zipper/data/A0.pdf",
    "name": "Document-A0.pdf"
  },
  {
    "url": "/zipper/data/B0.pdf",
    "name": "Document-B0.pdf"
  },
  {
    "url": "/zipper/data/C0.pdf",
    "name": "Document-C0.pdf"
  }
];

await downloadZipFile(files, {
  zipFilename: 'my-files.zip',
  timeout: 30000,
  continueOnError: true,
  onProgress: (current, total) => {
    console.log(`Downloaded ${current}/${total} files`);
  },
  onError: (error, file) => {
    console.error(`Failed: ${file.name}`, error);
  }
});

Console Output

Console output will appear here when you run the code

💡 Tips

  • • Modify the configuration and click "Run Code" to test
  • • The code will actually download and create a ZIP file
  • • Watch the console output for progress and errors
  • • Copy the generated code to use in your own project