Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
no, it should not trigger a complete event. it should trigger an ioerrror event.
Copy link to clipboard
Copied
But here seems different i was download a video using URLloader in the middle i interrupted the connection so COMPLETE event is firing
Copy link to clipboard
Copied
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 .
Copy link to clipboard
Copied
i see that, too.
i don't know what's causing the problem, and i don't have time to investigate.
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now