Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
Problem with downloading multiple files with one button with Retool

I want to download multiple files at once with a button event in Retool. How can I do this with Retool? As another method, I first tried to collect all the files in a folder and download them with zip. But it created corrupt zip file.

I've seen posts about this issue on the Retool forum:

  • https://community.retool.com/t/download-a-blob-to-file/4608
  • https://community.retool.com/t/create-a-zip-file-in-retool/4906
const zip = new JSZip();
let count = 0;
const urls = [
  'https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg',
  'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSxl70GnCvkJzbeZ4vle5wSSOkbfcFiH6jGqxZ-v5seew5g9REYFQ1kEGa04ACE5wrLgSk&usqp=CAU',
];

urls.forEach(function(url){
    JSZipUtils.getBinaryContent(url, function (err, data) {
       if(err) throw err;
       count++;
       zip.file(`image-${count}.jpg`, data, {binary:true});
       if (count == urls.length) {
         zip.generateAsync({type:'blob'}).then(function(content) {
           utils.downloadFile(url, 'zipImages','zip');
         });
      }
    });
  });

Retool doc: https://docs.retool.com/docs/scripting-retool#utilsdownloadfiledata-filename-filetype

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!