Hello
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 http://www.telerik.com/help/aspnet-ajax/mvc-using-upload.html and tried this solution http://www.telerik.com/help/aspnet/upload/clientsidefilesizecheck.html but the method never gets called.
javascript function
radupload
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?
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 http://www.telerik.com/help/aspnet-ajax/mvc-using-upload.html and tried this solution http://www.telerik.com/help/aspnet/upload/clientsidefilesizecheck.html 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 |
alert('hei'); |
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?")) { |
progressArea.cancelRequest(); |
} |
else { |
progressArea.confirmed = "confirmed"; |
} |
} |
} |
radupload
<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" |
EnableFileInputSkinning="false"> |
</telerik:RadUpload> |
<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?