I have a file upload form. I would like to check the file size before actually downloading the file. I can do it in Chrome, but how do I get it to work in IE?
Please note that this is possible for gmail. When I drag the file to the file attachment area, it immediately tells me the file size. I tried this in IE9 and IE8. It can also tell me the file size, even if Iβm disconnected from the Internet, so I donβt like to download the file first. I did not (as far as I recall) had to provide any special ActiveX permissions or anything else.
I saw below in other answers, but this requires special permission from the user, right? I would like to avoid this. Also, I'm not sure how to actually get the file that I need for this.
var oas = new ActiveXObject("Scripting.FileSystemObject"); var e = oas.getFile(file.value);
source share