Retool JS Query cannot download multiple Files

// Check if domain need to be downloaded twice
    if (fileName.includes("new.risparmioadesso.eu")) {
      firstID = "1301015080";
      secondID = "1301303370";

      // Create a new Blob object with the modified CSV data
      const firstBlob = new Blob([modifiedCsv], {type: 'text/csv'});
      const secondBlob = new Blob([modifiedCsv], {type: 'text/csv'});
  
      // Download the first Blob object as a CSV file
      const firstUrl = window.URL.createObjectURL(firstBlob);
      const firstAnchor = document.createElement('a');
      firstAnchor.href = firstUrl;
      firstAnchor.download = firstID + '_Risparmioadesso.csv';
      firstAnchor.click();

      // Download the second Blob object as a CSV file with a different name
      const secondUrl = window.URL.createObjectURL(secondBlob);
      const secondAnchor = document.createElement('a');
      secondAnchor.href = secondUrl;
      secondAnchor.download = secondID + '_newrisparmioadesso.csv';
      secondAnchor.click();
    }

I have this code inside my JS Query to be able to download multiple files, but it is not working.

image

I have manage this option but when I click done it will keep blocking downloads of multiple files. How to solve it?

Hi @yeftanma Thanks for reaching out! I'm seeing the same thing on my side. I'm testing out some potential workarounds & will follow up with you :slightly_smiling_face:

Maybe this would help?

Otherwise, would it work to download a zip file?