Download multiple files on one click

Hello Guys, I am trying to download multiple files from the aras innovator SP11. I have written javascript code. I am fetching all the files from the relationship and trying to download all at a time. Below is my code -
for(var i=0; i<array.length; i++){ var myFile = aras.getItemById("File", array[i], 0); aras.downloadFile(myFile,aras.getItemProperty(myFile, "filename")); }
By using this code it is downloading only one file. I have added loop and trying to download the all files. Any one have idea on it? What is the issue?    
  • Any help from expert? Is this possible? Chris, Do you have any idea?
  • Hi Aaba, This is an issue I've run into previously when trying to download multiple files through JavaScript. There doesn't seem to be a simple workaround to this issue, but it is possible to do something like below using Server Methods.
    1. Download all of the files to a selected folder on the server
    2. Using the standard System.IO.Compression library, create a zip file containing all of these files
    3. Upload that new zip file to the vault
    4. Using a client method, download that zip file to your users local machine
    This is admittedly a more complex way to accomplish than you may be looking for, but depending on the use case, your users may appreciate having all of the selected files in one zip anyway. Chris
    Christopher Gillis Aras Labs Software Engineer