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) {
console.error(err)
} else {
console.log(url)
}
})
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 ?