0 Replies Latest reply on Mar 1, 2010 10:02 AM by GeorgeWS

    air coldfusion upload image

    GeorgeWS Level 1

      I have an air app that takes a picture with a webcam, saves it to the documentsDirectory this works great. I now want to send the images from the folder to a CF 8 server. Im doing this for my AIR upload statement:








      function upload():void




      var uploader:Uploader = new Uploader();


      var dir:File = File.documentsDirectory.resolvePath("images");


      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 +




      And my CF looks like this:


      <cffile action="upload" filefield="file" destination=http://to my directory/>


      I get an error:

      Error #2044: Unhandled ioError:. text=Error #2038: File I/O Error. URL: http://to my cf page/upload.cfm


      Im pretty sure that my problem is in my cffile im not sure what would be in the filefield.

      When I put in an alert to try and see the path or file name Alert.show(files.toString()) I just get this [object File] so im not sure Im getting the path into my files:Array


      Any thoughts thanks