FileValidating event not firing? Please help!

  •  06-18-2009, 8:39 AM

    FileValidating event not firing? Please help!

    Here is the code for my upload control:
     
    <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Browse for Files"
                                ManualStartUpload="true"
                                MultipleFilesUpload="true"
                                MaxFilesLimit="10"
                                OnUploadCompleted="Uploader_UploadCompleted"
                                OnFileValidating="Uploader_FileValidating"
                                TempDirectory="~/___UploadTemp"
                                CancelButtonID="ButtonCancel"
                                >
                            <VALIDATEOPTION
                            AllowedFileExtensions="jpg,mp4,mp3,mov"
                            MaxSizeKB="256000"
                            />
                        </CuteWebUI:Uploader>
     
    I have this method setup:
     
         public void Uploader_FileValidating(object sender, UploaderEventArgs args)
        {
            DebugLabel.Text += "<br/>" + DateTime.Now + "FileValidating - " + args.FileName;

        }
     
    And in the OnInit event, I added this (I tried without this as well):
     
    Uploader1.FileValidating += new UploaderEventHandler(Uploader_FileValidating);
     
     
    For some reason the event is not firing...   Any ideas?
     
    Also, when this event fires should the files be ready to move?   I am doing a lot of operations (move, verify, create thumbs, etc) and the page hangs for a bit.  I can't figure out a reliable way to show a please wait message (and disable the browse/upload buttons) that will turn on once the upload button is clicked and turn off once all the operations are complete.
     
     
     
     
View Complete Thread