Downloading multiple files from Google Cloud Storage in NodeJS

I am hosting a NodeJS app on Heroku in which users can upload their own images. I am hosting those images on Google Cloud Storage because Heroku will wipe them if they weren’t part of the deployment. So I check to see if the images are on the server. If they aren’t on the server, then they are requested from GCS.

When I try to download multiple images from a GCS Bucket to my host server, all image files downloaded will be the same as the last image in the request. If I have 1 image in the request, then the downloaded image will be correct. If I have more than one file, then only the last downloaded image is correct. The rest of the files have the correct filename, but the image downloaded for all of them are identical.

images.forEach((req) => {
  if (!fs.existsSync(`uploads/${req.imageName}`)) {
    storage.downloadImage(req.imageName).catch(console.error);                
  }
});

I have tried using async/await (awaiting the download) based on this post, but that yielded the same results. I’m not sure how to validate if a file on the server has completed a download.