Restrict attaching big files using Javascript
<p>How can we restrict users from attaching file bigger than specified size (to say 20MB).
I do have a check at the server side to show errors in case of big files received on the server but that happens too late.</p>

<p>I want to achieve something like gmail, where you get a quick alert specifying </p>

<p><code>"This file exceeds the 25MB attachment limit. Sorry."</code></p>

<p>Thanks!</p>

<p>Pratik</p>
