Download Files from Storage

Learn to download files from a Cloud Storage bucket with Firebase.

Like file uploads, we must first create a reference to the file to download files from a Cloud Storage bucket. We’ve already covered how to create references in the previous lesson. Feel free to head back if you need a refresher.

Simple file download

To download an existing file from the Storage bucket, we must call the getDownloadURL function with the reference that holds the file in the bucket as a parameter. This function returns a JavaScript promise that resolves with the download URL of the file:

Get hands-on with 1200+ tech skills courses.