Upload error message "File size (undefined B) is to large. The maximum file size allowed is set to: 10.00MB."

Last post 02-28-2011, 9:10 PM by Kenneth. 4 replies.
Sort Posts: Previous Next
  •  02-10-2011, 5:29 PM 66160

    Upload error message "File size (undefined B) is to large. The maximum file size allowed is set to: 10.00MB."

    Why is "(undefined B)" displayed as part of the error message? Can this be removed?
     
    This was run on a plain IE8 (no flash/silverlight).
     
    Thanks!
     
    Rob 
  •  02-11-2011, 8:17 AM 66172 in reply to 66160

    Re: Upload error message "File size (undefined B) is to large. The maximum file size allowed is set to: 10.00MB."

    Dear rmacfadyen,
     
    Did you limit the value of upload size? You can remove this limitation and set this value to larger and try it again:
     
     <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Upload Multiple Files (Max 10M)"
                    MultipleFilesUpload="true" OnFileUploaded="Uploader_FileUploaded">
                    <ValidateOption MaxSizeKB="10240" />
                </CuteWebUI:Uploader>
     
    Thank you for asking
  •  02-11-2011, 1:28 PM 66175 in reply to 66172

    Re: Upload error message "File size (undefined B) is to large. The maximum file size allowed is set to: 10.00MB."

    Eric,
     
    Thanks... you are correct that I have limited the file upload size... but I really need the upload limitation.
     
    I'm just concerned about the actual text of the error message... the "(undefined B)" portion will just cause confusion with users. This error message problem seems to only happen when using the browser standard upload button (the browser did not have flash or silverlight installed).
     
    Can the message be customized or corrected?
     
    Thanks,
     
    Rob 
  •  02-27-2011, 12:41 PM 66468 in reply to 66175

    Re: Upload error message "File size (undefined B) is to large. The maximum file size allowed is set to: 10.00MB."

    Any chance of a response?
  •  02-28-2011, 9:10 PM 66488 in reply to 66468

    Re: Upload error message "File size (undefined B) is to large. The maximum file size allowed is set to: 10.00MB."

    Hi rmacfadyen,
     
    The example below shows you how to catch the error and show your customize information.
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="CuteWebUI" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head runat="server">  
    7.     <title>Untitled Page</title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <div>  
    12.             <CuteWebUI:Uploader ID="uploader1" runat="server">  
    13.                 <ValidateOption MaxSizeKB="10" />  
    14.             </CuteWebUI:Uploader>  
    15.         </div>  
    16.     </form>  
    17. </body>  
    18. </html>  
    19. <script>  
    20.    function CuteWebUI_AjaxUploader_OnError(msg)  
    21.     {  
    22.         if(msg.indexOf("The maximum file size allowed is set to")!=-1)  
    23.         {  
    24.         //show the message you want  
    25.             alert("The file is locked");  
    26.            return false;  
    27.         }  
    28.     }  
    29. </script> 
     
    Regards,
     
    ken
View as RSS news feed in XML