Re: You can control the event of failure increase when we pass on the file size?

  •  05-31-2012, 12:25 PM

    Re: You can control the event of failure increase when we pass on the file size?

    Hi deneus,
     
    Yes, please try the example below. If the file size large then 10 MB, it will shows the message and redirect to other site.
     
    <%@ Language="VBScript" %>
    <!-- #include file="aspuploader/include_aspuploader.asp" -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>
    example
    </title>
    </head>
    <body>
    <div>
    <form id="form1">
    <%
    Dim uploader
    Set uploader=new AspUploader
    uploader.Name="myuploader"
    uploader.MaxSizeKB=10240
        %>
        <%=uploader.GetString() %>
    </form>
    </div>
    </body>
    </html>
    <script>
    function CuteWebUI_AjaxUploader_OnSelect(files)
    {
        if(files[0].FileSize>10240)
        {
            window.top.location="http://www.google.com";
        }
    }
    </script>
     
    Regards,
     
    Ken 
View Complete Thread