Twitter LogoFacebook Logo
Cloud Storage - Download File
Hello, in this tutorial, I’ll show you how to download files from your Firebase Cloud Storage in Unreal Engine using the Firebase Blueprint Plugin.
By: King

Hello, in this tutorial, I’ll show you how to download files from your Firebase Cloud Storage in Unreal Engine using the Firebase Blueprint Plugin


To begin, make sure you have some files in the Storage.

Image from Codeible.com

Then in the blueprint, call the Download File node.

Image from Codeible.com

Set the path to the file in the Cloud Storage using the Storage path pin.

Click and hold on it. Then drag on an empty spot.

Search for Make Array and select it in the menu.

Image from Codeible.com

If we look at the file I want to download, it is located inside the images folder and called image with the type png.

Image from Codeible.com

In the array, I’ll insert images for the first element and then add another element for the file name.

Image from Codeible.com

The local path pin represents the location of where you want to download the file to.

For Android or iOS, make sure that the directory is writable, or you’ll not be able to download the file.

I’ll use the Project Persistent Download directory since it’ll work for Android and iOS. Then I’ll append it to give the downloaded file a name.

Image from Codeible.com

The next thing you’ll need to do is to put the maximum byte size for the download. It does not need to be the exact amount but it should not be a lot larger than what you need.

Let’s say I’ll be downloading images that are between 5-10 megabytes - then I should put the max size to 10 megabytes. 

To get the amount of bytes in 10 megabytes, I’ll do 1024 * 1024 * 10. Because 1024 bytes is 1 kilobytes and there are 1024 kilobytes in 1 megabytes.

Image from Codeible.com

Adding the Callbacks

Lastly, add the callbacks. Click and hold on them and drag on an empty spot. 


Select Add Event, then Add Custom Event.

Image from Codeible.com

For demo purposes, I'll add print nodes to the callbacks.

Image from Codeible.com

Now when I run the app and click on the download button, I should see a message on the screen telling me that the file is downloaded.

Image from Codeible.com

If I go to the Saved folder of the project, there should be a folder call PersistentDownloadDir. If I go into it, we should see the file.

Image from Codeible.com

Sign In