How to download all files from AWS S3 buckets' url as zip using ReactJS

Viewed 78

I have a usecase where I have to download multiple files (I have s3 URL for those files)

how can I download those files all together as a zip?

How to create stream of files and get it download?

These are the sample URL. I want to download all these files in one single zip. (note file type could be pdf/png/jpeg) Below is the data I am receiving now I have to make one zip file containing all files. How can I do it using ReactJS?

{
    item1: {
        name: "dummy.pdf"
        relativeUrl: "b9dde810-4935-4471-a22d-bdaf61e8bd62dummy.pdf"
        url: "https://upaged-file-store-prod.s3.ap-southeast-2.amazonaws.com/b9dde810-4935-4471-a22d-bdaf61e8bd62dummy.pdf?AWSAccessKeyId=AKIAVRO4YTL2YDUPVPPW&Expires=1625413917&Signature=z1DacLIOltfmFJbpt7AEy%2BeoK0s%3D"
    }, item2: {
        name: "Sell the Solution, Not the Product..png"
        relativeUrl: "6397c507-0d05-4cd7-8e4b-371249f72dbeSell the Solution, Not the Product..png"
        url: "https://upaged-file-store-prod.s3.ap-southeast-2.amazonaws.com/6397c507-0d05-4cd7-8e4b-371249f72dbeSell%20the%20Solution%2C%20Not%20the%20Product..png?AWSAccessKeyId=AKIAVRO4YTL2YDUPVPPW&Expires=1625413938&Signature=zkDHlWu9kv%2BXgOpRQToG%2Bpbyafk%3D"

    }, item3: {

        name: "ales-nesetril-Im7lZjxeLhg-unsplash.jpg"
        relativeUrl: "2e07b606-d1a0-4587-b8bb-c8f4b3927483ales-nesetril-Im7lZjxeLhg-unsplash.jpg"
        url: "https://upaged-file-store-prod.s3.ap-southeast-2.amazonaws.com/2e07b606-d1a0-4587-b8bb-c8f4b3927483ales-nesetril-Im7lZjxeLhg-unsplash.jpg?AWSAccessKeyId=AKIAVRO4YTL2YDUPVPPW&Expires=1625413971&Signature=U0d4%2BAPwi6e41c%2BU542ydoj%2BGBk%3D"

    }, item4: {
        name: "icons8-dashboard-layout-96.png"
        relativeUrl: "18b4312f-dd20-4c8f-89d3-bea024fb32b6icons8-dashboard-layout-96.png"
        url: "https://upaged-file-store-prod.s3.ap-southeast-2.amazonaws.com/18b4312f-dd20-4c8f-89d3-bea024fb32b6icons8-dashboard-layout-96.png?AWSAccessKeyId=AKIAVRO4YTL2YDUPVPPW&Expires=1625413996&Signature=9IXyDVvRKAAWcs2yR%2FChE4pj5Sc%3D"

    }

}
0 Answers
Related