2 Replies Latest reply on Feb 8, 2010 10:19 AM by andymckay456

    Large file uploads

    andymckay456 Level 1

      We are trying to large file uploads into an application, ideally using a PUT. To do a PUT we use uploadUnencoded on a file.

       

      However when the file goes over 100mb (roughly), there is a significant pause the AIR app "hangs" disk usage shoots up and eventually the upload starts. For example on a say 2gig file, you'll be watching the app do nothing for quite a while. Once it gets past that, it runs fine.

       

      I've found some workarounds such as http://soenkerohde.com/2010/01/chunk-file-upload/ (via POST) or http://code.google.com/p/as3httpclientlib/ but I can't figure out how to integrate that into a JS based AIR app.

       

      I know the docs say there's a 100mb limit, but I'm not sure this is the problem, they work once that initial load is completed.

       

      Anyone regularly done uploads of several gig files via PUT?

        • 1. Re: Large file uploads
          QueTwo Level 1

          I would imagine that this has to do with you reading the entire file into memory to send it via HTTP.  This would be a limitation of the WebKit implentation that currently exists.  I don't know if it has been fixed in the latest AIR 2.0 beta that just got pushed out onto Labs.

           

          Ultimatly, you may want to take one of these OSS projects you found (the as3httpclientlib looks most promising), and compile a very small flash app that co-exists in your JS AIR app.  You would be able to call it directly from JS, and use the functions that you expose just like the rest of the API's that exist in the AIR framework.

          • 2. Re: Large file uploads
            andymckay456 Level 1

            Thanks for the help, we've pretty much decided to just make multiple small posts of the data to the server.