1 Reply Latest reply on May 27, 2010 3:05 PM by GeorgeWS

    Air Upload photo to server

    GeorgeWS Level 1

      I have an air app. It uses a webcam to take a picture. So... I can see the image on the local machine, so that part works. When I try and upload it to my CF 8 server, nothing happens. Here is my code for the upload:



      function upload():void




      var uploader:Uploader = new Uploader();


      var dir:File = File.documentsDirectory;



      var files:Array = dir.getDirectoryListing();


      for (var i:uint = 0; i < files.length; i++)


      file = files[i];


      if (!file.isDirectory)






      uploader.addEventListener(Event.COMPLETE, uploadCompleteHandler);

      uploader.addEventListener(ProgressEvent.PROGRESS, progressHandler);

      uploader.start(UPLOAD_URL +




      If I dont handle the error in my upload.cfm I get this:

      Error #2044: Unhandled ioError:. text=Error #2038: File I/O Error. URL: http://intranet.youngsmarket.com/bla/bla/upload.cfm 


      I try and put in Alert.show(file.toString()); and other stuff I always get the same response: [object File]


      Im not sure where to go from here. I have been trying different things for 4 whole days. I have other apps that select using the browse and FileReference method but thats not what I want. I want the image from the directory on the machine. Any thoughts?


      oh yeah my cfm is like this:


      <cffile action="upload" filefield="file" destination="##ExtendedPath('\')"#youngsmarket\bla\bla\myImages" />


      I think my filefield is not correct not sure what to put there. but I dont think that will fix my issue.