From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Download a file URL from storage

Download a file URL from storage

- [Instructor] The objective will be to write a new functions to again access the Firebase storage bucket in order to download a file URL, so we can set new documents with images with text and images. So let's go back to the documentation and you're going to find this section which is Download Files. And first, obviously, you're going to need to create a reference, a path reference, to get access to the image. So the file location of the image. And finally, we're going to be able to download the data with one URL We're going to do that with this method, and it's going to return a URL that we can use to then access the information, so the information on the cloud storage. So let's do that. I'm going to go back to storage and we're going to add first this to the scope, which is getDownloadURL from the SDK. And we're going to go ahead and create a new handler function. I'm going to name this one downloadFile. And this one…

Contents