How to know the size of the image to be uploaded with javascript?
<p>There is a webpage on my website where user can upload pictures. I want to set the limit of the pictures to be uploaded upto 2mb. Currently it uploads image of all sizes. If the picture is less than 2mb it will go along the normal path and get uploaded and if it is greater than 2mb a pop up should show error message. Can anybody help me in how to do this with javascript alone? Any help would be appreciated.
Thanks!</p>
