Uploaded image is too large

Last post 05-26-2010, 10:00 AM by frJericho. 6 replies.
Sort Posts: Previous Next
  •  05-18-2010, 6:40 PM 61118

    Uploaded image is too large

    I am restricting the size of image files my users are authorized to upload with the following C# code:

    cm_htmlcontent.SetSecurityMaxImageFolderSize(1024 * 5);
    cm_htmlcontent.SetSecurityMaxImageSize(150);

    When I upload very small images (30KB or less) it works fine. However, when I attempt to upload a file that is a littel bit larger while still being under the max size I get the following error message:
     
    Why is CuteEditor refusing to allow a file that is clearly smaller than the maximum allowed?
     
  •  05-19-2010, 1:51 AM 61133 in reply to 61118

    Re: Uploaded image is too large

    frJericho:
    I am restricting the size of image files my users are authorized to upload with the following C# code:

    cm_htmlcontent.SetSecurityMaxImageFolderSize(1024 * 5);
    cm_htmlcontent.SetSecurityMaxImageSize(150);

    When I upload very small images (30KB or less) it works fine. However, when I attempt to upload a file that is a littel bit larger while still being under the max size I get the following error message:
     
    Why is CuteEditor refusing to allow a file that is clearly smaller than the maximum allowed?
     
     
    Hi frJericho,
     
    This is very strange, can you send me your test file "sshot-11.png"? I will test it and get back to you as soon as possible.
     
     
    Regards,
     
    Ken
  •  05-20-2010, 10:04 AM 61184 in reply to 61118

    Re: Uploaded image is too large

    The ratio of your pictures is 1054X704. The editor default max width/height is 1024/768. 

    <security name="MaxImageWidth">1024</security>
    <security name="MaxImageHeight">768</security>

    So, editor will try to resize the photo size. However for this particular picture, its actual size is compressed. So when editor resizes the photo, its actual size will be larger than the value you set. 

    We will provide a more reasonable message when the problem occurs in next patch. 

    For now, you can change the MaxImageWidth and MaxImageHeight to a large value to avoid this issue. 

    In “CuteSoft_Client\CuteEditor\Configuration\Security\Default.config”


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-20-2010, 10:38 AM 61188 in reply to 61184

    Re: Uploaded image is too large

    Thanks for the feedback. I will wait for the next patch and in the meantime I will increase the authorized width and height.
  •  05-26-2010, 7:16 AM 61324 in reply to 61188

    Re: Uploaded image is too large

    FYI: I know you are already worling on as solution but just wanted to inform you that I was able to reproduce the problem this morning on this forum. I was typing a question and needed to include a screenshot to illustrate what I was talking about and I got the following message:
     
  •  05-26-2010, 9:26 AM 61335 in reply to 61324

    Re: Uploaded image is too large

     
    You can turn off the "Automatic Image Resizing", and test it again.  You can refer to http://cutesoft.net/developer+guide/scr/Automatic-Image-Re-Size.htm and turn off the "Automatic Image Resizing".
     
    The security policy file (default.config, admin.config and guest.config) can be found in the /CuteEditor/Configuration/Security folder. Please open security policy , if you update the following setting to larger value and avoid the image resize, can you reproduce this issue? 
    <security name="MaxImageWidth">1024</security>
    <security name="MaxImageHeight">768</security>
     
    Regards,
    Eric
     
  •  05-26-2010, 10:00 AM 61337 in reply to 61335

    Re: Uploaded image is too large

    What you are sugesting is exactly the workaround I implemented : I doubled the max width to 2048 and the max height to 1536 and my users no longer get the error message.
View as RSS news feed in XML