Re: Anti-Virus upon upload?

  •  11-21-2008, 10:31 AM

    Re: Anti-Virus upon upload?

    Allen:
     
    You can use the OnFileValidating event to write the custom validation code :
     
    <CuteWebUI:UploadAttachments runat="server" ID="Uploader1" OnFileValidating="Uploader1_FileValidating" />
     protected void Uploader1_FileValidating(object sender, UploaderEventArgs args)
     {
          if(!CheckFileStream(args.OpenStream()))
                throw(new Exception("You file is not valid!"));
     }
     
    this exception message would pass to client side , and the uploader would alert it to the users.
     
    Regards,
    Terry
View Complete Thread