Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How to upload/download a .txt file ? — Gideros Forum

How to upload/download a .txt file ?

chuz0chuz0 Member
edited November 2015 in General questions
I'm trying to update a text file that is stored remotely... it works great locally but have no idea how to do it from a http://www.domain.com/text.txt

Is there an easy way to do this ?

Comments

  • unlyingunlying Guru
    edited November 2015 Accepted Answer
    local loader = UrlLoader.new("<a href="http://domain.com/text.txt&quot" rel="nofollow">http://domain.com/text.txt&quot</a><img class="emoji" src="http://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" />
    local function onComplete(event)
    	local out = io.open("|D|file.txt", "w+")
    	out:write(event.data)
    	out:close()
    end
    loader:addEventListener(Event.COMPLETE, onComplete)
    double "" in urlloader.
  • Thanks for your answer @unlying,
    I didn't express myself correctly.
    I've created another discussion showing the tests I've done, which shows what I'm intending to do.
    http://giderosmobile.com/forum/discussion/6158/help-with-sockets-#Item_1

    Would be great if you could chip in :)
Sign In or Register to comment.