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
From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Get started with Cloud Storage on the web3m 13s
-
(Locked)
Define an async function to send a file to storage5m 35s
-
(Locked)
Upload a file to the storage3m 17s
-
(Locked)
Download a file URL from storage6m 10s
-
(Locked)
Set documents with images: Update the UI5m 27s
-
(Locked)
Set documents with images: Set the date4m 10s
-
(Locked)
-
-
-
-
-