I used the ActiveXObject browser for IE, but it does not work. I got the file size for other browsers in js but could not get the file size for IE browser. For this, I used the following code: -
if ($.browser.msie==true)
{
var fileSystemObject = new ActiveXObject("Scripting.FileSystemObject");
var path = document.uploadDocumentForm.documentUpload.value;
var file = fileSystemObject.getFile(path);
var size = file.size;
alert(size);
}
else
{
var fileInput = $("#"+fileId)[0];
var imgbytes = fileInput.files[0].size;
var imgkbytes = Math.round(parseInt(imgbytes)/(1024));
}
Can anyone help me get the file size for IE browsers. I went through all the ideas, but could not get the file for IE browser. Please provide an idea or code for this ...
source
share