Downloading with http.request corrupts file

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
NickRock
Citizen
Posts: 76
Joined: Thu Dec 25, 2014 9:33 pm
Location: Earth
Contact:

Re: Downloading with http.request corrupts file

Post by NickRock »

zorg wrote:
NickRock wrote:If you mean io.open equivalent, I don't think so. There's nothing similar to io.open in the documentation
io.open's counterpart would be [wiki](File):open[/wiki]. :o:
That's good to know, thanks!
Weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeooow!!
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: Downloading with http.request corrupts file

Post by Tjakka5 »

As suggested I've made it so the counter function appends the chunk to a 'file' variable.
When the thread is finished downloading, it returns that file and from there I can either load it up directly, or use love.filesystem.write to save it in my save directory.

Works perfect. Thanks for the help!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 3 guests