Skip to main content
Inspiring
May 17, 2017
Question

download files to local system

  • May 17, 2017
  • 1 reply
  • 506 views

Dear Friends,

Greetings! iam creating an app using Air. i have 2 buttons in it. when user click on each button it has to download respective zip files from site and unzip to the local system. iam using Fzip to unzip and "fileStream.writeBytes(data_val, 0, data_val.length);" for copying zip files to local.

i can download files and unzip to local system successfully.

When iam downloading 100mb any number of time its working fine. When iam downloading 500mb files, first time its downloading and unzipping fine, second time onwards it is not downloading giving following error.

Error: Error #1000: The system is out of memory. at flash.net::URLStream/readBytes() at flash.net::URLLoader/onComplete()

please help me to solve this..

Thanks in Advance,

Syed Abdul Rahim

This topic has been closed for replies.

1 reply

Known Participant
July 13, 2017

i suggest you to saving file with small chunks

write bytes to file as you receive it use URlStream instead of UrlLoader

and read file async opening filestream with openAsync