Is it possible to download files from internet runtime?

I need to download a long list of files from internet to my project directory at initial game setup.

For images, there’s a workaround with these two nodes in a loop:
imagen
Still not tested but I guess that will work.

BUT: That method is very unefficient, I’m decoding and re-encoding every image, so probably very slow. I have around 100 images to download.

Also, my download includes some wave audio files, short videos and csv’s, and the workaround above is for image files only.

Is there any function to download files as simple files , and store them in a local drive?

Something like these nodes we have for local file handling
imagen
…but with an URL slot in the Source.

Can not find any function or trick to achieve this. Anyone has a clue?

Definitely possible. You may have to write a custom C++ object to handle such download and cache.

That Download Image would work, just note that the Export to Disk part has to be linked from On Success exit. Otherwise you’ll get an error because the Download Image is asynchronous.

Consider some packing method for your files. 100 files downloaded one-by-one will still take long time.

2 Likes

Hi!

Yeah, i took me a couple of hours to figure out how to make async loads at the right pace in background. Tricky! At this point I’m accessing the images on demand directly from the cloud to the dynamic material instance. Works consistently but it’s slow. Takes 2-3 sec. to download each set of 4-5 images. That’s why I’m wondering how to pre´download them all to local drives during an intro video, then fly.

I can not write a line of C++. I’ll look in the marketplace or hire someone to code it for me. It’s a must for this project.

And, yes. A zip file would be way faster, expect another post in the forum asking "How to unzip a file runtime? LOL. I guess with a command line somewhere, isn’t it?

Thank you @Rimbeer

Update:

Solved with this plugin.

Now I can even download from GoogleDrive. The Download Image node can not access Drive files, but this plugin does.