Re: Get Total file size when flash and silverlight are disabled/uninstalled

  •  04-22-2010, 2:28 PM

    Re: Get Total file size when flash and silverlight are disabled/uninstalled

    Dear ggar,
     
    Please use the following method:
    <script>
    function CuteWebUI_AjaxUploader_OnSelect(selects)
    {
     var uploader=this;
     var queues=uploader.getitems();
     var queuesize=0;
     for(var i=0;i<queues.length;i++)
     {
      
      if(queues[i].Status=="Error")
       continue;
      queuesize+=queues[i].FileSize;
     }
     var selectsize=0;
     for(var i=0;i<selects.length;i++)
     {
      selectsize+=selects[i].FileSize;
     }
     var totalsize=queuesize+selectsize;
     if(totalsize>10*1024*1024)
     {
      alert("you cant upload 10M files");
      return false;
     }
    }
    </script>
     
    Regards,
    Eric
View Complete Thread