I have a requirement to check the file size which is being uploaded before sending the file to the server for the validation. The maximum file limit set is 10 MB for the upload, beyond which it is not to be allowed.
I tried couple of things,
For Firefox and Chrome -
var file = document.getElementById(idName).files;
file.size returns the correct size. But unfortunately this doesn't work with the IE(Sometimes I hate IE).
I tried to Google any solution for the IE Browser, some people suggested to use ActiveX, but sadly I can't use it.