Skip to main content
kiran1989
Inspiring
June 27, 2014
Question

What will happen if downloading was interrupted

  • June 27, 2014
  • 4 replies
  • 444 views

Hi Guys

I was downloading a file using URLLoader. While it is downloading if any interruptions occurred like loosing internet connection. Does it fire EVENT.Complete event.

Thanks you

This topic has been closed for replies.

4 replies

kiran1989
kiran1989Author
Inspiring
July 2, 2014

Thanks Kglad for you answers. I assume that when we call load() method in URLLoader at that time it will check for IOerrors and Security errors. In the middle it wont check for ioerror and security errors. If some thing went wrong in middle of downloading it assumes downloading was finished and firing complete event. I was thinking this  was correct

kiran1989
kiran1989Author
Inspiring
June 30, 2014

So to be very clear. We can download any kind of data using URLLoader weather it may be binary data, xml data, text data or object data, json data. So I am downloading the video using binary data by mentioning  _urlloader.format =  URLLoaderDataFormat.BINARY. When downloading is finished i am getting data in byte array format and using the byte array i am converting it into video and saving it to local disk.

I was bit confused when download was interrupted in middle  it should fire ioerror event but it is triggering complete event .

kglad
Community Expert
Community Expert
June 30, 2014

i see that, too.

i don't know what's causing the problem, and i don't have time to investigate.

kiran1989
kiran1989Author
Inspiring
June 30, 2014

But here seems different i was download a video using URLloader in the middle i interrupted the connection so COMPLETE event is firing

kglad
Community Expert
Community Expert
June 27, 2014

no, it should not trigger a complete event.  it should trigger an ioerrror event.