Download multiple files to zip by url






















Connect and share knowledge within a single location that is structured and easy to search. I have two functions here that takes an array of file keys, and passes it to a download function that will download each file individually from aws s3. I would like to have all the files together in one zip folder and just download that one zip folder, so that all the files are together. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.

Learn more. Asked 1 year, 8 months ago. Active 1 year, 8 months ago. Viewed 3k times. Questions: 1st How would I first set the directory to save the files to? Jordan Spackman.

Jordan Spackman Jordan Spackman 5 5 silver badges 17 17 bronze badges. Your Name. Your Email Address. Send Email. LinkedIn 0 Tweet 0 Facebook 0 Email 0.

Tags : JavaScript saveAs zip files. You may also like Web Components with React Hooks April 4, Notify of. Inline Feedbacks. Before applying new solutions, my system allows downloading a single report file. There are many ways to do that. I choose the 2nd approach since I want to cache all the generated files. The browser will do the rest to download the file. Another way to handle this is by using fetch to download files and store data as Blob in memory.

We can then write it to file or combine those blob data into a zip file. This function returns a promise to be resolved as a blob. We can combine with a Promise. But what happens if we need to download a huge amount of files at once? Using Promise. Your code will send a thousand requests at once. There are many problems with that approach:. The solution I thought about is to divide the files into multiple groups. Instead of starting to download them all at once by Promise.

After finishing those 5, I will start another pack.



0コメント

  • 1000 / 1000