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