0 Replies Latest reply on Jan 16, 2009 6:54 AM by RIADeveloper2009

    File upload related

    RIADeveloper2009
      i have seen that while uploading from flex,the fileList array of FileReferenceList populates the user selected file at a random order when user selects file as discrit selection and continious when user selects file sequentally. Is there any way to populate the fileList array as the order in which user selects the file?
      i am tiered finding a way out, can enybody help.
      Attach Code

      // Called to add file(s) for upload
      public function addFiles():void {
      _refAddFiles = new FileReferenceList();
      new ArrayCollection(_refAddFiles.fileList).removeAll();
      _refAddFiles.addEventListener(Event.SELECT, onSelectFile);
      var imageTypes:FileFilter = new FileFilter(imgformats,imgTypes);
      var videoTypes:FileFilter = new FileFilter(videoformats, vidTypes);
      var allTypes:FileFilter = new FileFilter('Images and Photos (*)', imgTypes+vidTypes);
      var fType:Array = new Array(allTypes,imageTypes,videoTypes);
      _refAddFiles.browse(fType);

      }

      // Called when a file is selected
      private function onSelectFile(event:Event):void {

      _uploadFileList = _refAddFiles.fileList.reverse(); // this is the point facing problem.......
      //Alert.show("fileList>> "+ ObjectUtil.toString(_uploadFileList));
      if(getTotalFileSize())
      {
      startUpload();
      }

      }