Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Trouble with network.Download
Started by artsystem.gerardo Nov 26 2018 11:47 AM

No replies to this topic
download network file pdf
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 2 posts
  • Corona SDK

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:


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)

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