0 Replies Latest reply on Dec 10, 2010 5:44 AM by saariko

    what is the best and easiest way to upload a big file from an AIR app to a server?

    saariko

      hello everyone

      i am a self-teach-as-i-go kind on person, and this is my first encounter with uploading to a server, websites and all

      i have written an AIR app in which the user chooses pictures from his/her computer and fills out numerous forms. at the end i want to upload all this data to my server

       

      currently, all the data folder gets compressed to a single zip file (using noChump zip library). i did this for simplicity reasons (uploading only a single file) - the size is the same. this files can get up to 200mb in size

       

      as a server, i have one domain I have bought and currently only a small space (1G - basic). I control it using Parallels® Plesk panel (default from the company i bought the domain and space from)

       

      I have no knowledge other then as3 (thanks, OReilly!), so i thought of something that doesn't require server side scripting.

      after messing around a bit i found the code at this question: http://stackoverflow.com/questions/2285645/flex-crossdomain-xml-file-and-ftp

      (thank you Joshua). please look at that code, basically, it uploads through a socket

       

      I fixed it up a bit and was able to upload a 64mb zip file to my httpdocs folder in my domain. this included hard coding my username and password

      looking at my site managing panel i see the file created and expanding in size, end at the end i even dowloaded the zip and decompressed it - all well.

       

      my questions are:

      1. the upload continued even when i exit my air app! how does this work?

      2. i cant get progress events to fire (this relates to question 1).

      3. this domain also holds my web page. is httpdocs the correct folder to put in user data? how do i give each user their own username and password?

      4. is this the right way to go anyway? remember file sizes could reach 200mb and also, secure transferring is not a must

       

      hope you guys can make sense in the mess

      cheers

      Saar