Is there a way to check file size on the client (without the use of ActievX which also errors out), before it is passed back to the server? in asp
Asked
Active
Viewed 90 times
1 Answers
0
In ASP? No, by definition. Active Server Pages can't do anything before they get a request from the client.
There is a draft File API that will allow you to perform this sort of check using client side JavaScript. The Mozilla Developer Network has a guide on getting information about selected files. Once you have a reference to the file, you can just access its .size
property.
Note that since the specification is a draft, it is rather new and subject to change. This one is very new and thus has [very limited browser support](http://caniuse.com/#search=file api).
You might also be able to achieve what you want using a Java applet or Flash (the latter of which would be better supported).

Quentin
- 914,110
- 126
- 1,211
- 1,335