Get File size in bytes using javascript works in IE

Posted by Yshsrinivasan under ASP.NET on 11/7/2012 | Points: 10 | Views : 1744 | Status : [Member] | Replies : 0
I want file size in bytes using javascript which works in IE i had already tried this

function getSize()
var myFSO = new ActiveXObject("Scripting.FileSystemObject");
var filepath = document.upload.file.value;
var thefile = myFSO.getFile(filepath);
var size = thefile.size;
alert(size + " bytes");

But it is not working in my website.

I am getting exception of "ActiveXobject"



(No response found.)

Login to post response