problem with filesize check in mvc

Thread is closed for posting
2 posts, 0 answers
  1. Morten
    Morten avatar
    1 posts
    Member since:
    Jun 2010

    Posted 24 Jun 2010 Link to this post

    I'm having a problem with checking filesize in RadUpload in my mvc project. I have made the changes to get radupload working with mvc  and tried this solution but the method never gets called.

    javascript function
        function checkUploadedFilesSize(progressArea, args) { 
            //progressArea.confirmed is a custom variable, 
            // you can use another if you want to 
            if (!progressArea.confirmed && 
           args.get_progressData().RadUpload.RequestSize > 1) { 
                if (confirm("The total size of the selected files" + 
                     " is more than the limit." + 
                     " Do you want to cancel the upload?")) { 
                else { 
                    progressArea.confirmed = "confirmed"

    <telerik:RadUpload ID="imageUploader" runat="server" AllowedFileExtensions=".jpg,.jpeg,.gif,.png" 
        Language="nb-NO" Localization-Add="Legg til" Localization-Clear="Fjern" Localization-Delete="Fjern" 
        Localization-Remove="Fjern" Localization-Select="Velg" ViewStateMode="Inherit" Culture="nb-NO" CssClass="userImageUpload" Skin="Vista" 
    <telerik:RadProgressArea runat="server" ID="RadProgressArea1"  OnClientProgressUpdating="checkUploadedFilesSize"/> 
    <telerik:RadProgressManager runat="server" ID="RadProgressManager1"  AjaxUrl="~/Telerik.RadUploadProgressHandler.axd" /> 

    Also I don't know if this has anything to do with it but looking in firebug the first call when uploading a file always fails, and the last call seems to be waiting for a response forever. Uploading files still work okay though.

    Anybody knows what might be the problem?

  2. Genady Sergeev
    Genady Sergeev avatar
    1600 posts

    Posted 28 Jun 2010 Link to this post

    Hello Morten,

    Do you do your tests on IIS or on a local host? If IIS, which is the version that you use?  Please, paste your web.config here (excluding any passwords/usernames or connection strings) so that we can take a look at it. In fact, the point of interest is whether the RadUploadHttpModule is registered properly. The same applies to RadUploadHttpHandler. For more information on how to register properly the RadUploadHttpModule please take a look at the following link.

    You need to follow the instructions for the Httphandler as well, just don't forget sufix it with axd extension instead of ashx.

    Genady Sergeev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top