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

Last post 05-31-2012, 12:25 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  05-30-2012, 11:43 AM 73792

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

     

    Hey.
     I have a question about ASP Uploader.
     You can control the event of failure increase when we pass on the file size?
     In the current examples when the file is too large we see a sale of alarm that tells us that we exceed the permitted size, but I want to control this event to jump to a different website possible?


    Hola.
    Tengo una pregunta sobre sobre ASP Uploader.
    Se puede controlar el evento de fallo de subida, cuando sobre pasamos del tamaño de archivo?
    En los ejemplos actuales cuando el archivo es demasiado grande nos aparece una venta de alarma que nos indica que sobrepasamos el tamaño permitido, pero yo quiero controlar ese evento para saltar a una pagina web diferente es posible?

  •  05-31-2012, 12:25 PM 73806 in reply to 73792

    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 as RSS news feed in XML