network.* API’s are not FTP, they are HTTP based. They are totally different protocols. FTP doesn’t use URL’s to find things like HTTP does. But if your content can be gotten to with a URL, you can use network.download() just fine. It will operate on the hosts HTTP port 80 or HTTPS port 443, where as FTP runs on port 21 (could impact things behind a firewall)
I understand. I wanted to use FTP just as a way to protect my downloadable content so not anyone with just the URL could get to it. But it sounds like there is no way to use FTP and be able to get download progress of the file?
I’m not saying if you can or cant. That’s something to ask Graham or for you to look at the FTP code and see if you get the filesize passed to you before you start downloading and if there is any thing that is looping and getting blocks, or if it just downloads the whole file. I don’t have any experience with that, so Graham will be your best resource or studying the code.
Alright, is there a way I can contact specific people on the forums? the comments on that FTP-Helper page seem locked so I don’t have a way to contact Graham.
You could try googling him and see if you can find a public contact for him. He also goes by Glitch Games.
@rob,
I haven’t been able to hear back from Graham.
I am wondering, do you think it would be possible if I knew the size of the file I am trying to download, to then just check file size locally on the device as the file downloads so I could see how far along the download progress is?
That’s usually the way it works. You get the size of the file and then your amount downloaded / total size = percent downloaded.
Great I will give that a try, thanks for your time.
@Rob. When I start my file download, the app freezes to the point that I can’t do anything until the file is fully downloaded, meaning that I can’t even be checking the file size. I wonder whats going on, I thought that file download was asynchronous?
I think I am just going to break down and use the network.request API with the new progress listener. I just wanted to try and protect my app assets by using FTP. Hopefully the Zip plugin will get password protection soon!
The FTP uses the Lua socket support which is blocking. network.* API calls are async and will work