1 Reply Latest reply on Jun 1, 2010 3:33 PM by Cyril Hanquez

    Flex/Air image uploading

    GeorgeWS Level 1

      I have this to read the saved image:





      Any thoughts would be great for I am stumped.




      function upload():void



      var uploader:Uploader = new Uploader();


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


      var files:Array = dir.getDirectoryListing();


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


      if (!file.isDirectory)




      private function progressHandler(event:ProgressEvent):void

      trace("Progress", event.bytesLoaded, event.bytesTotal);




      private function uploadCompleteHandler(event:Event):void






      This seems to be doing the right thing. When I use the Debugger it looks like its uploading the image. But It never gets to its destination. I am using ClodFusion 8. I made an errordebug.pdf page to show me whats going on. It says in the detail [empty string] and that my FileField is "File". To me that means I am not calling in the image. I can see that that the images are saved on the local machine. My upload.cfm is like this:


      <cffile action="upload" filefield="File" destination="c:\inetpub\wwroot\images\" accept="application/octet-stream"/>



      * Upload complete handler.













      uploader.addEventListener(Event.COMPLETE, uploadCompleteHandler);

      uploader.addEventListener(ProgressEvent.PROGRESS, progressHandler);

      uploader.start(UPLOAD_URL +


      file = files[i];