ISS
ISS

Reputation: 416

Download Firebase Storage folder to a Cloud Functions Temporary Folder

I'm trying to download the entire folder from Firebase Storage so I can zip those files and upload them back to Firebase Storage while generating a download link.

I have read a lot of posts and code but everything seemed getting away from my scope.

Do you have a clear example on how to download a Firebase Storage Folder to a Cloud Functions Temporary Folder or at least some hints on I could do it, keeping in mind that I am targeting a specific folder?

Upvotes: 0

Views: 899

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317808

There is no bulk download operation provided by the SDK. The general pattern for downloading all files with some shared prefix using the node SDK for Cloud Storage will be:

  1. list the files using getFiles at the prefix (folder) of interest
  2. iterate them
  3. download each one separately

Upvotes: 1

Related Questions