|
|
||
|
Hi,
ok, I've got Lua socket up and running. Is it possible to download a jpeg through a url like http://www.images.com/random.jpg through the http interface? I'm not sure how to setup a sink for this kind of case. Any pointers appreciated.
It certainly is. You can save the data you receive to disk
or do anything else you may want to with it. Something like
this
local s = http.request("http://www.images.com/random.jpg")
local f = io.open("random.jpg", "wb")
f:write(s)
f:close()
Can you try it?
[]s,
Diego