FileStateChanged Called multiple times per file

May 5, 2009 at 4:07 PM

I'm looking to output the status of a file upload and use the "FileReceived" ability in code behind.
The problem is when enabling "FileReceived", the javascript  FileStateChanged is called two times.

Therefore, my message for each file is showed multiple times. The file state is 3 each time. 

I have:

function FileStateChanged(uploader, file, httpStatus, isLast) {
    Flajaxian.fileStateChanged(uploader, file, httpStatus, isLast);
      var t = Flajaxian.$("MyDiv");
      t.innerHTML += "file: " + + " state: " + file.state + "</br> ";      



fjx:FileUploader ID="FileUploader1" MaxFileSize="4MB" MaxFileSizeReachedMessage="No files bigger than {0} are allowed"
MaxNumberFiles="2" MaxFileNumberReachedMessage="You can select only up to {0} files in one queue"
AllowedFileTypes="Web Images (Jpeg, Gig, Png):*.jpg;*.jpeg;*.png;*.gif"
JsFunc_FileStateChanged="FileStateChanged" OnFileReceived="FileReceived" runat="server">


Also, is it possible to stop all processing? I've tried:
but the uploader continues to process the remaining files.

May 5, 2009 at 4:12 PM
When working with FileStateChanged function you have to take into consideration file.state property as shown in the example below: