FileStream bytesAvailable 1GB limit?

I'm working with reading very large files, around 5 GB, in an AIR application.
When I open a ~5GB file into a FileStream, bytesAvailable has a value of 1073741824 (0x40000000, exactly 1 GB). I therefore can not read past a 1GB boundary with any combination of .readBytes() and/or setting .position.
Is this an expected behavior? Is there any other way to read the full contents of files > 1GB size?
Below is a sample application. When I select my large file the trace is:
5368709120 1073741824
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onCreationComplete(event);"> <mx:Script>  <![CDATA[   private var _docsDir:File = File.documentsDirectory;   private var _stream:FileStream;   private function onCreationComplete(event:Event):void {    _docsDir.addEventListener(FileListEvent.SELECT_MULTIPLE, onSelectFile);    _docsDir.browseForOpenMultiple("Select File");   }
   private function onSelectFile(event:FileListEvent):void {    _stream = new FileStream();    _stream.open(event.files[0], FileMode.READ);    trace(event.files[0].size, _stream.bytesAvailable);   }  ]]> </mx:Script></mx:WindowedApplication>

Hi Chris,
Wanted to know if there are any similar issues for AIR apps on iOS. (Flex 4.6, AIR 3.6, iOS 6.0.1)
I am trying to load a file remotely, it gets loaded successfully. After this, I am trying to read the loaded data into a bytearray using URLStream. Here it fails when we user readBytes. Sometimes it will be successful in reading the files, but again later on when I am trying to write this bytearray data to a local file, it fails again when I use filstream.writeBytes().
It works fine without any problems when I test it on laptop as AIR app, but fails on the device
private var fileData:ByteArray = new ByteArray();
public function getFileRemote(pathRemote:String, fileNameR:String):void 
urlStream = new URLStream();
var urlReq:URLRequest = new URLRequest(pathRemote); 
urlStream.addEventListener(Event.COMPLETE, loaded);
urlStream.addEventListener(ProgressEvent.PROGRESS, doEvent);
urlStream.load (urlReq); 
fileName = fileNameR;
private function loaded(event:Event):void 
try{
progress = progress + 'before urlStream.readBytes\n';
saveLog();
urlStream.addEventListener(ProgressEvent.PROGRESS, doEvent);
urlStream.readBytes (fileData, 0, urlStream.bytesAvailable); // for file sizes greater than 50MB (upto 800-900MB max in our case), readBytes fails and gets into catch block
progress = progress + 'after urlStream.readBytes success\n';
saveLog();
resolveFile(fileName);
}catch(e:Error)
progress = progress + 'catch urlStream.readBytes\n';
saveLog();
private function resolveFile(pathLocal:String):void 
fileLocal = File.applicationStorageDirectory.resolvePath(pathLocal);
//if(!fileLocal.exists)
//fileLocal = File.desktopDirectory.resolvePath(pathLocal); 
var fileStream:FileStream = new FileStream(); 
fileStream.addEventListener(Event.CLOSE, fileClosed);
fileStream.addEventListener(OutputProgressEvent.OUTPUT_PROGRESS, onFileWriteProgress);
fileStream.addEventListener(IOErrorEvent.IO_ERROR, onFileWriteIO);
try{
//fileStream.openAsync(fileLocal, FileMode.WRITE);
fileStream.open(fileLocal, FileMode.WRITE);
progress = progress + 'zip fileStream.open success\n';
saveLog();
}catch(e:Error)
progress = progress + 'zip fileStream.open error\n';
saveLog();
try{
progress = progress + 'before fileStream.writeBytes \n';
saveLog();
fileStream.writeBytes(fileData, 0, fileData.length);   //writeBytes also fails and gets inside catch block someimtes or most of the times, it crashes on the device
//fileStream.writeObject(fileData);
progress = progress + 'after fileStream.writeBytes success\n';
saveLog();
}catch(e:Error)
progress = progress + 'zip fileStream.writeBytes error\n';
saveLog();
fileStream.close();
sqlite.openDb(fileLocal);
Can you kindly help? And point out if there any file readBytes\writeBytes limitations on iOS? Or if there are any alternatives for me apart from this code?
Appreciate your help.
-Deepak

Similar Messages

  • MOVED: KT 4V memory 1GB limit?

    This topic has been moved to AMD SocketA based board.
    KT 4V memory 1GB limit?

    Quote
    I just upgraded one of my older PCs with a 1GB DDR DIMM(PC2100/266).  The motherboard is KT3 (MS-6380E).  Three slots...doesn't matter the order or if the 1gb is the only one in...still comes up at 512MB.
    I upgraded the bios...although after flashing the bios the AMI version is the same (3.31a).  Any other ideas?  This seems to be a common problem...doco clearly states 1gb DIMMs are supported.
    Quote
    the problem is common because a lot of people simply purchase the cheapest memory they can find.
    Since there are over hundreds types of memory modules and they are using different type of DRAMs to build them, it is very possible that you have purchased a (cheap) memory module which is not compatible with your computer.  For example, there might be 3-4 different types of 128MB memory modules and some computers are very picky and can only support 1 type or 2 types of 128MB memory modules.  If  it is incompatible, then usually you will not be able to boot up your system or you will see frozen screen or system might only recognize half of the memory size.  In order to avoid this kind of situations, I strongly suggest you visit www.digi4me.com and read the fine print regarding very low compatability chipset mobos.
    Cheers, and yes, you're right, manufactares should do the things the right way, but in some cases they use cheap components. 

  • KT 4V memory 1GB limit?

    hi, I have the KT4V mobo (KT400 chipset) .... and I started to need more memory than 768 MB (512+256 modules)(mostly cause of video processing) ,
    so I just bought a fresh "common" 1 GB DDR 400 MHZ module and inserted it in and the result is that :
     I cannot get board to map more than 1 GB ... it works this way
       1024 MB = 1024 MB
       1024+256 = 1024 MB
       1024+512 = 1024 MB
       1024+768 = 1024 MB
    I've tried swapping slots a bit and it doesn't works better that way =always the same = just 1 GB....
    btw I set mem frequency to 266 in bios (cause i run 16.5 @ 142 ) so memory will stay 1:1 to FSB.
    memtest runs fine
    cpu-z and sanrda detects both chips !
    i've tried to turn bank-interleave to 2-way,4-way,off, but it doesn't do anything ....
    did some of you experienced similar situation ? found a solution ?
     I would be glad to hear how to work it out .....
    btw: sorry I just realized that this section is now just for 64bit, can moderator move it to right group please ? (socketA boards) ?

    Quote
    I just upgraded one of my older PCs with a 1GB DDR DIMM(PC2100/266).  The motherboard is KT3 (MS-6380E).  Three slots...doesn't matter the order or if the 1gb is the only one in...still comes up at 512MB.
    I upgraded the bios...although after flashing the bios the AMI version is the same (3.31a).  Any other ideas?  This seems to be a common problem...doco clearly states 1gb DIMMs are supported.
    Quote
    the problem is common because a lot of people simply purchase the cheapest memory they can find.
    Since there are over hundreds types of memory modules and they are using different type of DRAMs to build them, it is very possible that you have purchased a (cheap) memory module which is not compatible with your computer.  For example, there might be 3-4 different types of 128MB memory modules and some computers are very picky and can only support 1 type or 2 types of 128MB memory modules.  If  it is incompatible, then usually you will not be able to boot up your system or you will see frozen screen or system might only recognize half of the memory size.  In order to avoid this kind of situations, I strongly suggest you visit www.digi4me.com and read the fine print regarding very low compatability chipset mobos.
    Cheers, and yes, you're right, manufactares should do the things the right way, but in some cases they use cheap components. 

  • 1gb size limit

    Hello,
    I have written to [email protected] 4 times and did not get any answer, I thus post this request in this forum
    We recently closed a 1ml$ consulting deal with Sogessur (insurance branch of Société Générale).
    The deal involves the participation of Sogessur, Oracle France and Oracle SSI resources in 4 different projects.
    Given the number of parallel projects and the duration of the agreement (1.5 years) I anticipate that the Beehive space will grow in size beyond the allocated 1gb, also because Oracle will support the maintenance of the developed applications.
    Could you let me know whether if it is possible to expand the 1gb limit easily when we reach it?
    It is an important criteria in order to select the appropriate collaborative tool.
    Thank you for your feedback
    Kind Regards
    Marcello Reina
    Senior Consulting Manager

    Phil,
    I also raised an SR to expand our project's workspace quota of Beehive Online from given 1GB to 4GB in a certain reason. Support recommended me to contact Beehive Online Admin. I've tried hard to contact him/her since last week.
    Things are becoming critical now, so we need additional space as soon as you can. Please let me know how to proceed further.
    Kind regards,
    Yaz

  • 1GB motion menu limit error, have tried every solution

    I'm desperate here, I'm on a deadline and there seems to be no way around this error. I have a project with about 50 motion menus, each an average of 20-30 seconds. I encoded the menu videos to DVD-standard MPEGs before importing them into Encore to ensure the total of them would be under 1gb. All of them total 907mb, yet Encore is STILL telling me my motion menus exceed the limit.
    I also noticed that, even though I specified "Don't Transcode" on all my menu MPEGs, Encore still transcoded about 10 of them, it looks like it transcoded all the transitional videos. This could possibly be putting me over the 1gb limit, but I doubt it as all of them are only around 2-3 seconds each. So two questions: Why is Encore transcoding DVD-compliant MPEGs, and what could be pushing me over the 1gb menu limit? I've read several other topics similar to this, and have tried everything, including checking to see if some of my motion menus were actually pointing to longer videos, they're not.
    Thanks for anyone's help, I'm dead in the water right now.

    Yeah that's exactly what I'm saying, I encoded everything beforehand to DVD-compliant MPEG2 video and Dolby audio files, and everything added up to 906mb (transitions, motion backgrounds and audio). So the only thing not taken into consideration are the subpicture highlights. Could those be 100mb? Good grief, I have 34 minutes of motion menus and transitions at 906mb, if I go any lower these will really start to look bad. I guess there's no other solution here. Is there any way for me to find out how much exactly my menu content is taking up after encoding? It would sure be helpful of Encore to include that instead of just stating that "you're over the 1gb limit".

  • Cannot build DVD menu because of Total menu size exceeds limit

    Encore won't build my project when i compile it but when i do the check project it shows no error. It starts building and when half of it is done, the error appears and stops the compiling. I have tried reducing the size of all my videos and putting them in MPEG-2 DVD format but it didn't change anything. Since the check feature doesn't see the errors i'm thinking it must be some glitch and i would like to know how to get passed it.
    Anyone knows how i can fix this ?

    It's not Encore, but the DVD-spec. that is standing in the way. The complete Menuing of the DVD may not span a .VOB, which is ~ 1GB in size. The only course of action is to find ways to trim your Menus and their navigation to below that 1GB limit - the max size of the first .VOB in the Project.
    This is for the Menus and all of their Assets, and not the rest of your Project's MPEG-2 files. Those can span several .VOB's.
    Please tell us more about your Menus, their number, any Motion/Audio, etc. There might be some suggested methods for trimming those in the details. The more details, the easier it will be for someone to give suggestions that will only lightly impact your Project, and let you get to Burning.
    Good luck, and we'll be looking for those details on everything regarding your Menus.
    Hunt

  • Can one limit updating of shared Photostreams to when the phone is connected to computer?

    My mum has a 5S with iOS 8 which is connected to a shared photo stream where I post photos and videos of our family. My mum's contract has a 1GB limit and she noticed this month that she passed that limit. I think this is because her phone updates the shared photo stream over the cellular network (she doesn't have a wifi network at home). Is there a setting in iOS 8 to limit such updating to when the phone is connected to her computer?
    Many TIA
    Philip

    Hello pullman,
    Thanks for using Apple Support Communities.
    I understand from your post that you want to disable the cellular data connection with Photos as to avoid overages.  To do this, go to Settings > Cellular, and turn photos off.
    iCloud: Troubleshooting iCloud Photo Sharing and Shared Photo Stream
    Cheers,
    Alex H.

  • Actionscript 3 and AIR - FileStream

    Hi.
    look at this actionscript code:
    import flash.filesystem.*;
    import flash.events.Event;
    import flash.net.FileFilter;
    var fileToOpen:File = new File();
    var txtFilter:FileFilter = new FileFilter("Text", "*.as;*.css;*.html;*.txt;*.xml");
    try
        fileToOpen.browseForOpen("Open", [txtFilter]);
        fileToOpen.addEventListener(Event.SELECT, fileSelected);
    catch (error:Error)
        trace("Failed:", error.message);
    function fileSelected(event:Event):void
        var stream:FileStream = new FileStream();
        stream.open(event.target, FileMode.READ);
        var fileData:String = stream.readUTFBytes(stream.bytesAvailable);
        trace(fileData);
    The function fileSelected causes the error: 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.filesystem:File. ... exactly this line:
    stream.open(event.target, FileMode.READ);
    I got it from: http://help.adobe.com/es_ES/AS3LCR/Flash_10.0/flash/filesystem/File.html#browseForOpen()
    Thanks for the help.

    Hi,
       Wondering if someone helped you. I want to open xsl or csv file and using below code
    var file:File = evt.currentTarget as File;
            file = file.resolvePath(file.nativePath);
            var fileStream:FileStream = new FileStream();
            fileStream.open(file, FileMode.READ);      
            var fileData:String =  fileStream.readUTFBytes(fileStream.bytesAvailable);        
            var endings:Array = [File.lineEnding, "\n", "\r"];
    but for some reason it return "ÐÏ ࡱ á" funny value. Any idea why don't i get the correct data from file.
    belwo is the csv file i am trying to open.
    Title
    Given_Name
    Surname
    Gong
    Salutation
    Position
    Organisation
    Address_Line_1
    Address_Line_2
    Address_Line_3
    Suburb
    State
    Postcode
    Country
    Home_Phone
    Fax
    Other_Phone
    User_Field_1
    User_Field_2
    User_Field_3
    User_Field_4
    Mobile_Phone
    Second_Address
    Second_Address_Line_1
    Second_Address_Line_2
    Second_Address_Line_3
    Second_Suburb
    Second_State
    Second_Country
    Second_Postcode
    Langcode
    Website
    Mr.
    Jeff
    Alexander
    Retention Marketing
    Monday, April 13th, 2009
    Mr.
    Anthony
    Demaso
    Retention Marketing
    Monday, April 13th, 2009
    Sally
    Swinamer
    Yield
    Monday, April 13th, 2009
    Chris
    Torbay
    Yield
    Monday, April 13th, 2009
    Annette
    Warring
    Genesis Vizeum
    Monday, April 13th, 2009
    Mr.
    Mark
    Khoury
    Genesis Vizeum
    Monday, April 13th, 2009
    Mr.
    Andy
    Thorndyke
    Thorsons
    Monday, April 13th, 2009
    Shannon
    Rutherford
    Central Reproductions
    Monday, April 13th, 2009
    Mr.
    Rob
    Greenwood
    Central Reproductions
    Monday, April 13th, 2009
    Lisa
    Marchese
    Des Rosiers
    Monday, April 13th, 2009
    Mr.
    Michael
    Whitcombe
    McMillan LLP
    Monday, April 13th, 2009
    Thanks,
    Gill

  • AIR File size limit?

    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.

    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

  • How do you remove iMovie 08 100MB limit to youtube?

    The standard youtube account has a 100MB limit. Fair enough.
    My youtube account has a 1GB limit as I have a director account.
    iMovie 08 disregards my youtube file limit, and won't let me upload any file over 100MB. How do I remove this restriction?
    I'm using the latest version of '08 (recent update applied).
    Thanks in advance!

    That's what I've been doing. Very annoying though. Part of the attraction of imovie 08 is that it handles everything in one place. I've been using vidnik to upload things (prefer software over the web interface). It would be great if imovie 08 was smart enough to detect the limit, rather than assume it's 100MB

  • Mobile data use limit

    Most mobile operators tend to have pretty measly (by todays standards) data limits. Mine is 1GB & after that I get charced 10c for every MB over the 1GB limit. Is there any way, or an App, that stops you using data beyond your limit so that you don't get charged? My data allowance is being eaten up at an alarming rate. So it would be cool if I could just stop my phone (or stop myself I should say) going over the limit by telling me I've reached it then even blocking automatically or at least warning me? I've got an App for my mobile provider that notifies me of data usage when I look. But of course it doesn't stop me from spending 10c for every MB I go over!!

    nbar wrote:
    The Best Data Usage Tracker for iPhone - Lifehacker
    Looks good. I'll buy that for a dollar

  • Should I use SharedObjects?

    Hi all,
    I'm making a desktop based program where I will need to save a lot of user information, and I am trying to figure out if SharedObjects is the answer. I do not plan on moving the application once it is installed on the user's computer either. I have a few questions:
    Does a shared object file get deleted when you uninstall the Adobe Air program from the computer? If not, when does the file get deleted?
    Is there a size limit for the shared object file that you create? I know for web applications, the adobe player prompts the user if more space is needed (I think default is 100K).

    Most easy it's JSON in case you are storing only text data.
    var userInfo: Object = {};
    userInfo.userName = "Anton";
    userInfo.age = 29;
    // saving
    filestream.writeUTFBytes( JSON.stringify(userInfo) );
    // loading
    var loadedData : Object = JSON.parse(filestream.readUTFBytes(filestream.bytesAvailable));
    This model will save and load Object via JSON. I use it everywhere because it's more easy to manipulate.
    Don't store Password in string format without encoding. I use in my app only md5. When user type own pass - it's converted to md5 and I'm comparing to stored past time in md5 and verify it.
    Images and etc you can save using File + FileStream directly in PNG/JPG format.
    1) Create use File.desktopDirectory.resolvePath("MyApp/"); folder with your app data
    2) Create for each website folder in MyApp folder so 1 site it's 1 inlcuded folder
    3) Save config there in JSON and put any other binary data in that folder so you newer will mix different files from different sites
    File allow to generate HUGE files. Last project allow me store 2gb files.

  • Mixing RAM Speeds In iMac G4 1GHz 17" Flat-Panel?

    I'm just checking here.
    I have an iMac G4 1GHz 17" Flat-Panel, Model M8935LL/A (USB 1.1 version) that currently has the standard 256MB PC2100 (266 MHz) RAM module installed in the factory slot, and a 512MB PC2700 (333 MHz) RAM module installed in the bottom (user-accessible) slot. I bought the machine direct from Apple, so despite the "official" spec (which calls for PC2100 RAM in both slots), it's obvious that Apple knows PC2700 RAM will work in that machine. My understanding is that the faster PC2700 RAM simply downclocks to accommodate the lower 266 MHz bus speed of the M8935LL/A. As I understand the DDR SDRAM spec, any DDR SDRAM (PC1600 through PC3200) module will simply overclock or underclock to accommodate the host bus speed...but feel free to correct me if I'm mistaken on that point.
    I'm fixing to upgrade the hard drive to a larger capacity model. I've done it before, so I know it's no picnic. Since I have to go past the factory RAM slot anyway to change the hard drive, I figure I might as well upgrade the internal RAM to the full 1GB limit. (Yes...I know Apple says you can't exceed 512MB in either slot, so please—no remonstrances about sticking to Apple's spec. The spec is wrong.)
    Obviously, it's possible to mix the two RAM speeds between the two slots, since Apple shipped the computer that way. Here are my questions:
    • Is there any downside to going the other way when I upgrade the RAM—that is, putting a 1GB PC2700 (184-pin) module in the factory slot, and a 1GB PC2100 (200-pin) module in the user slot? The reason I ask is because my preferred supplier (OWC) can't supply me with both modules in the same speed.
    • Is there any performance advantage in both modules being the same speed—that is, both PC2100 or both PC2700? If not, I'll just buy the one of each speed that OWC has available.
    Thanks!

    jjw wrote:
    So, you know have 2Gb available in your flat screen imac?
    Yes indeed—2GB confirmed as available by Apple System Profiler. Both modules are PC2700. Everything is working fine.
    I guess I can understand why Apple discourages users from replacing the 184-pin "factory slot" module. There's not a whole lot of slack in the motherboard connector cables, so it's best to disconnect them in order to get the bottom section to lie flat on the workbench. I suppose some folks might be hesitant about disconnecting things, but it's really quite simple, and involves only three connectors. After having changed the hard drive a few years ago, replacing the RAM was a piece of cake by comparison.
    A word of caution to anyone who's going to attempt it, though. There are TWO heat sink interfaces between the bottom section (where the motherboard is mounted) and the top dome. Those heat sink surfaces are coated with thermal paste at the factory, but the compound dries out over time, becoming a rubbery membrane between the heat sink surfaces. Once you separate the top and bottom sections, the membrane rips apart, and the firm connection between the heat sink surfaces is permanently gone. It's a bad idea to simply put them back together after you change the RAM module; you won't get a good thermal connection.
    The solution is to scrape all of the old rubbery compound off all four surfaces (two on the bottom and two on the top section). I did it with a piece of PVC, but you can use anything with a sharp edge that won't scratch the metal surface—even your fingernails will work, unless the old compound has dried out to the point where it's hard. After you scrape the old gunk off, apply new thermal paste to all four surfaces.
    The other maintenance item you can perform while you're in there is cleaning out all the dust, which accumulates in vast quantities and interferes with cooling. I vacuumed it out with a plastic crevice tool, being careful NOT to touch any of the components with the tool. Vacuuming can build up a static charge on the tool, especially in dry environments, and high static voltages aren't friendly to microprocessors. I used a securely grounded anti-static wrist strap throughout the entire operation, and even wrapped it around the vacuum tool.
    Good luck!

  • Half of my data disappeared off my seagate external drive

    I cannot find half on the data i had on my external hard drive, I didn't delete them accidentally nor do i have any viruses, Any idea how (if possible) I can recover these files? I can't find many data recovery software that are compatible with OS Lion. Thanks!

    I received the text message and email confirming that my bill has been paid, and the data usage on my phone is clear, showing that I am in fact on the new cycle. I have restarted the phone multiple times, and followed your initial instructions again, and the icon still will not go away. Though, now it does say that I am "182KB over the specified limit" rather than the "83.22kb" it said yesterday.
    If it might help, I will also say, I purchased this device through Tigerdirect.com and activated it through their instructions. My initial plan was one with a 1gb limit, I have since downgraded a few times, the 250mb plan being the lowest I have selected. As I said in my last post, I upgraded to a larger data plan, which would be the first time I've raised the limit, rather than lowered. With this in mind, maybe the phone doesn't understand this, as you said.
    If anything changes I will keep you updated.

  • How to upload file to server?

    Hi all,
    I am writing a code to upload a zip file to client server. I am using Flash Builder 4.6, Extension Builder 2.1 on a Win 7 machine. My request includes login and password authentication and other params. I am sending the file contents as byte array. But, the return code I get from the server suggests that it does not receive any file. It gets null in the file parameter.
    Here is my code,
    var request:URLRequest = new URLRequest("http://<url>api/plugin.php/");
    request.method = URLRequestMethod.POST;
    var fileStream:FileStream = new FileStream();
    fileStream.open(PKG_FILE, FileMode.READ);
    var byteArr:ByteArray = new ByteArray();
    fileStream.readBytes(byteArr, 0, fileStream.bytesAvailable);
    request.data = "login=" +
      LOGIN +
      "&password=" +
      MD5.hash(PASSWORD) +
      "&pkg=" +
      byteArr +
      "&pkg_name=" +
      PKG_NAME;
    var loader:URLLoader = new URLLoader();
    // Call OnSuccessfulExportif export completes
    loader.addEventListener(Event.COMPLETE, OnSuccessfulExport);
    // Call OnUnsuccessfulExportif export failed
    loader.addEventListener(IOErrorEvent.IO_ERROR, OnUnsuccessfulExport);
    loader.load(request);
    ======================================================
    private function OnSuccessfulExport(event:Event):void
      trace(event);
    I get a callback on OnSuccessfulExport function, but the value returned from the server in event.target.data is that the server received no file.
    Am I missing something here?

    storing:
    The data of your uploaded document is stored in your context node.
    Read this data, turn it into a table with one of the SCMS* functions.
    store it in a table, or write it into a file. Whichever you choose.
    downloading again:
    read all data from your table or file
    turn it into an xstring using one of the SMCS* functions
    put the xstring in the context node bound to your downloadfile element
    The principle is deadsimple. The only thing that really matters is where you want to store the file. And that is more of technical ABAP R/3 question, if not a functional question than a webdynpro for abap one.

Maybe you are looking for