kendo.ui.UploadSelectEvent file size is null in IE8

3 posts, 1 answers
  1. Laksh
    Laksh avatar
    25 posts
    Member since:
    Mar 2011

    Posted 02 Sep 2014 Link to this post

    Im using kendoUpload control to upload the file. Everything works fine in IE10, but as soon as I switch to IE8 mode the uploaded file size property remains null.
    is it by design?

    $importFiles.kendoUpload({
          async: {
              autoUpload: false,
              saveUrl: saveUrl,
              removeUrl: removeUrl
          },
          multiple: false,
          showFileList: true,
          select: (e: kendo.ui.UploadSelectEvent): void => {
              $selectMsg.show();
          },
          upload: (e: kendo.ui.UploadUploadEvent): void => {           
              var file: any = e.files[0];          
               
              // file.size is null in IE8
              if ((file.size != null) && (((file.size / 1024) / 1024) > allowedFileSizeInMB)) {
                  showErrorModal('The selected file is too large.');
                  e.preventDefault();
                  $selectMsg.hide();
              }
          }       
      });
  2. Laksh
    Laksh avatar
    25 posts
    Member since:
    Mar 2011

    Posted 02 Sep 2014 Link to this post

    i'm sorry its not UploadSelectEvent event but its UploadUploadEvent event
  3. Kendo UI is VS 2017 Ready
  4. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 03 Sep 2014 Link to this post

    Hi Laksh,


    The size of the uploaded file cannot be retrieved in Internet Explorer 9 and earlier versions because of browser limitations and there is no workaround for this. This functionality is working in IE 10 and in every other modern browser.

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top