Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
IgUploader disabled, after uploading a file more than maxFileSize
posted

Hi Team

I'm facing issues in igUpload.

I'm uploading a file more than maxFileSize ( Eg : 100KB), after that upload controller gets disabled. i can't able to upload the file.

How to upload a file after that error. Kindly help me out.

Thank You

Karthikeyan Rajakumar

 $(function () {
        $("#igUpload1").igUpload({
            mode: 'single',
            autostartupload: true,
            progressUrl: "http://igniteui.com/IGUploadStatusHandler.ashx",
            controlId: "serverID1",
            maxFileSize: 100000,
            errorMessageAJAXRequestFileSize: "File must be smaller than 100 KB.",
            errorMessageMaxFileSizeExceeded: "File must be smaller than 100 KB.",   
            errorMessageCancelUpload : "Upload Cancelled",
            onError: function (e, args) {
                debugger;
                showAlert(args);
            }
        });
        function showAlert(args) {
            $("#error-message").html(args.errorMessage).stop(true, true).fadeIn(500).delay(3000).fadeOut(500);
        }
    });

Parents
  • 23953
    Offline posted

    Hello Karthikeyan,

    I suspect that this behavior is caused by the maxFileSize option. What I can suggest is that you make the server-side validation of the file size by using the "maxFileSizeLimit" application setting in the web.config file like this:

    <appSettings>

        <add key="maxFileSizeLimit" value="4194304" />

    </appSettings>

    See the "igUpload Overview" topic for details.

    Best regards,
    Martin Pavlov
    Infragistics, Inc.

Reply Children