Maximum file size under IIS7 and custom oversize warning

Last post 08-08-2009, 9:26 PM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  08-07-2009, 2:07 AM 54563

    Maximum file size under IIS7 and custom oversize warning

    Hi,
     
    Could you tell me the maximum file size, per file, that can be uploaded if the site is running under IIS7?
     
    Also - is this limit per-file? - i.e. if the maximum is 2GB could the user select 3 2GB files when multiple file upload is enabled?
     
    I'd also like to display a custom warning message to the user (instead of the controls default Javascript alert box) when they choose a file over the maximum size (i.e. prompting them to zip a file up into seperate smaller files) - how can I achieve this?
     
    Many thanks,
     
    db
  •  08-08-2009, 9:26 PM 54582 in reply to 54563

    Re: Maximum file size under IIS7 and custom oversize warning

    Hi,
     
    2G limit is per file.
     
    You can use the OnSelect event to show the custom error message :
     
     <script type="text/javascript">
     function CuteWebUI_AjaxUploader_OnSelect(files)
     {
      for(var i=0;i<files.length;i++)
      {
       var file=files[i];
       if(file.FileSize!=-1)
       {
        if(file.FileSize>102400)
        {
           alert(file.FileName+" is larger then 100K");
           return false;
        }
       }
      }
     }
     </script>
     
    Regards,
    Terry
View as RSS news feed in XML