Re: Large File Upload

  •  07-01-2013, 12:16 PM

    Re: Large File Upload

    Hi jmoseley,

     

    You can try the example below, it support resume. Note that, the resume function is  based on the silverlight plug-in, so you need to set the upload type to silverlight and the browser must has the silverlight plug-in installed.

     

    1. <%@ Page Language="C#" Title="Customize the queue UI" %>  
    2.   
    3. <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    5.   
    6. <script runat="server">  
    7.   
    8.     
    9.   
    10. </script>  
    11.   
    12. <html xmlns="http://www.w3.org/1999/xhtml">  
    13. <head id="Head1" runat="server">  
    14. </head>  
    15. <body>  
    16.     <form id="Form1" runat="server">  
    17.         <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" UploadType="Silverlight">  
    18.         </CuteWebUI:UploadAttachments>  
    19.         <div id="resumepanel" style="display: none">  
    20.             <span style="color: red">Error when uploading files</span>  
    21.             <button onclick="DoResume();return false;">  
    22.                 Resume Task</button>  
    23.             <button onclick="DoCancel();return false;">  
    24.                 Cancel Task</button>  
    25.         </div>  
    26.     </form>  
    27. </body>  
    28. </html>  
    29.   
    30. <script type="text/javascript">  
    31.     var uploader;  
    32.     function CuteWebUI_AjaxUploader_OnError(msg, task) {  
    33.         uploader = this;  
    34.         uploader.setresumeoption("Suppend");  
    35.         document.getElementById("resumepanel").style.display = "";  
    36.         return false;  
    37.     }  
    38.     function DoResume() {  
    39.         document.getElementById("resumepanel").style.display = "none";  
    40.         uploader.setresumeoption("Resume");  
    41.     }  
    42.     function DoCancel() {  
    43.         document.getElementById("resumepanel").style.display = "none";  
    44.         uploader.setresumeoption("Dispose");  
    45.     }  
    46. </script>  
     

     

    Regards,

     

    Ken 

View Complete Thread