Skip to main content
Participant
June 8, 2011
Question

AIR File size limit?

  • June 8, 2011
  • 1 reply
  • 528 views

Details:

AIR

FlashBuilder 4.0

Flex 4.0 SDK

My AIR app accepts files dropped into it. The app breaks them into chunks and moves them to a server. The process works for files up to 400mb, but when I go higher, the app locks up.

I don't get an error or system crash, when I'm using the release build. If I run it in debug, it runs out of memory.

I'm clearing the clipboard after every successful transmission.

I'm out of ideas.

This topic has been closed for replies.

1 reply

chris.campbell
Legend
June 8, 2011

It's hard to tell what might be going on without sample code, is there any way you could provide something to help us reproduce the problem internally?  You might also want to take a look at the following post:

http://forums.adobe.com/message/3428800#3428800

Thanks,

Chris

ange66Author
Participant
June 28, 2011

After tackling some other things, this has come back up on my plate.

Now I think I understand the openAsync() progress methodology, but I'm confused on how to tear off a chunk of the file to send it over the wire.

Here's my attempt to load the file via async.

public function loadAsync():void

{

     // create FileStream in read mode

          fileStream = new FileStream();

     //add listeners for the operations;

     fileStream.addEventListener(ProgressEvent.PROGRESS, AsyncProgressHandler);

     fileStream.addEventListener(IOErrorEvent.IO_ERROR, AsyncFileIOErrorHandler);

     fileStream.addEventListener(Event.COMPLETE, AsyncCompleteHandler);

     fileStream.readAhead=10485760;

     fileStream.openAsync( file, FileMode.READ);

}

private function AsyncProgressHandler(pEvent:ProgressEvent):void {

     var byteAry:ByteArray;

     fileStream.readBytes(byteAry, 0, fileStream.bytesAvailable);

          if (pEvent.bytesLoaded == file.size)

          {

               uploadBytes(byteAry);

          } else if (  pEvent.bytesLoaded == fileStream.readAhead) {

               uploadBytes(byteAry);

          }

}

Whenever I start the upload it says "Parameter bytes must be non-null