This is a migrated thread and some comments may be shown as answers.

kendo.ui.UploadSelectEvent file size is null in IE8

2 Answers 108 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Laksh
Top achievements
Rank 1
Laksh asked on 02 Sep 2014, 08:10 PM

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 Answers, 1 is accepted

Sort by
0
Laksh
Top achievements
Rank 1
answered on 02 Sep 2014, 08:12 PM
i'm sorry its not UploadSelectEvent event but its UploadUploadEvent event
0
Accepted
Dimiter Madjarov
Telerik team
answered on 03 Sep 2014, 07:24 AM
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!
 
Tags
Upload
Asked by
Laksh
Top achievements
Rank 1
Answers by
Laksh
Top achievements
Rank 1
Dimiter Madjarov
Telerik team
Share this question
or