Download a whole folder containing images from s3 bucket in client side


This Content is from Stack Overflow. Question asked by Hello World

I have a web app in which I am uploading some files like jpeg, pdf and png in different folders against a project name. The upload part is working fine when I upload a project from ReactJs it creates a folder containing 3 folders jpeg, pdf and png containing respective files.
After that I had a requirement of downloading the folder of jpeg, pdf or png but I am having issues in that.

const params = {
  Key: "projectName/images",
  Bucket: S3_BUCKET

s3.getSignedUrl('getObject', params, function (err, url) {
  if (err) {
  } else {

I am using the above code which say key doesn’t exist. Although when I pass the name of a file, the single file gets downloaded. How can I create a URL to download a folder containing files in ReactJS ?


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?