4

I have tried a lot but did not find any way to solve my problem.

How to get size of uploaded file in IE8,9 ?

1

1 Answer 1

2

You will need to use Active X as those versions of IE do not support the HTML5 File API. I found a code snippet on the web that does that.

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");
}

Refer this for details. Also take a look at the Remarks Section in the API Reference of IE for |input type=file| here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.