fileSize in netteForms.js does not work on Internet Explorer 8

Notice: This thread is very old.

7 years ago

radas
Member | 214
+
0
-

Hi,
in Nette 2.1-dev (2013–06–05) it's ok:

fileSize: function(elem, arg, val) {
  return window.FileList && elem.files[0] ? elem.files[0].size <= arg : true;
}

but from Nette 2.1-dev (2013–06–25):

fileSize: function(elem, arg, val) {
  if (window.FileList) {
    for (var i = 0; i < val.length; i++) {
      if (val[i].size > arg) {
        return false;
      }
    }
    return true;
  }
}

in Internet Explorer 8 always shows alert, that size of uploaded file is larger than allowed size, although it's not true.