Downloading Files
Learn and practice how to retrieve files from Firebase Storage to our local device.
Downloading files from Firebase Storage can be handled in several ways. We can use methods made available through the Firebase package or use other packages to handle and manage the download process.
The methods available through the Firebase SDK are:
Using the getData
method
The contents of a file can be immediately downloaded into memory as a byte array using the getData
method. This approach is appropriate for relatively small data, such as pictures or brief documents. If we wish to process the downloaded data right away without saving it in the local storage, the fact that the data is held in memory can be helpful. However, it’s important to note that using getData
on huge files might use up a lot of memory.
Get hands-on with 1400+ tech skills courses.