Hi everyone
I recently started developing with corona
My first app is a free access book download
However, i’m having trouble with the download
I have an event function, called from multiple components (images of the books), each component has a custom property for it’s file link and name, for example:
event.target.enlace="http://irizamar.com/libros/don\_quijote\_1.pdf" event.target.file="don\_quijote\_1.pdf"
This is the function
local function descargarLibro( event ) if ("ended" == event.phase) then print( event.target.enlace ) print( event.target.archivo ) network.download( event.target.enlace, "GET", downloadListener, event.target.archivo, system.DocumentsDirectory) end end
If i use print() i can see those values on the console, but the file is not downloading anywhere, not on corona’s emulator, nor on my phone
You can use that same link to access the book right now, so it’s not a problem on the server side
And if I use display.loadRemoteImage, the image does get downloaded from the same server
Thanks in advance