Function Call when Finished Uploading Multiple Files

Last post 02-25-2009, 10:15 AM by DarShak_Boy. 5 replies.
Sort Posts: Previous Next
  •  10-12-2008, 8:17 AM 44823

    Function Call when Finished Uploading Multiple Files

    Hi all,
     
    Is there a function that gets called only once when the uploader has finished uploading multiple files?
     
    It seems that _OnFileUploaded gets fired at the end but fires for each file that was uploaded.  I am looking for something that fires just once when the uploader has finished.

    Thanks for the help in advance.
  •  10-12-2008, 11:52 PM 44830 in reply to 44823

    Re: Function Call when Finished Uploading Multiple Files

    Hi,
     
     
    Currently we do not contains that server event .  Maybe we would provide that event in the future. We need think deeply on this issue.
     
    ----------
     
    Currently you can attach the uploader OnPreRender event , like this :
     
    int uploadedcount=0;
    void uploader_OnFileUploaded(...)
    {
        uploadedcount++;
        ...you must handle the event argument here..
    }
    void uploader_OnPreRender(...)
    {
        if(uploadedcount==0)return;
        ....now some files have been uploaded.
        ....process it here.
    }
     
     
    Regards,
    Terry
     
  •  11-18-2008, 11:31 AM 45918 in reply to 44823

    Re: Function Call when Finished Uploading Multiple Files

    Great! Found a way to set the controls causesvalidation to false.
     

    Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)

    MyBase.OnInit(e)
    Uploader1.InsertButton.ValidationGroup =
    "NoValidation"

    End Sub

  •  02-24-2009, 8:05 AM 49165 in reply to 44830

    Re: Function Call when Finished Uploading Multiple Files

    Hi,
     
    Another question about this FileUploaded event. It is fired once for each file uploaded. However, all events are fired after ALL files are uploaded (the postback occurs at the end only).
     
    Is there an event that is fired immediately after an upload (without waiting for the other files to be uploaded)? So that file processing can begin immediately?
     
    Thanks in advance!
    Dar
  •  02-24-2009, 10:44 AM 49169 in reply to 49165

    Re: Function Call when Finished Uploading Multiple Files

    Hi,
     
    Please check the FileValidating event.
     
    Regards,
    Terry
  •  02-25-2009, 10:15 AM 49227 in reply to 49169

    Re: Function Call when Finished Uploading Multiple Files

    Indeed, this event is fired immediately.
     
    Thanks a lot!
View as RSS news feed in XML