I am trying to do an update, so when the Lua application is out of date, it will use LuaSocket to load a new .exe file (which can run my Lua code).
Inside this update module, I want it to show how much has been downloaded so far. However, with the following HTTP request, it blocks the application until it is fully loaded:
local b, c, h = http.request("https://www.example.com/Download/Example.exe?from="..Game.Version)
I use streams to load it, however I still cannot write to a file until the download is complete inside the stream, so the progress bar will go 0%, 100%, without anything in between.
Is there anything you can do to download the remote file, but save it in a local file as it is downloaded?
cURL can do this. I don't know if LuaSocket or anything else for Lua can. :(
source
share