I wan to check the size of file at the time of upload in javascript (its an image file so if possible want to check in kb or bytes or in px)
Is there any way i can do it.
Thanks in advance!
<input type="file" name="ssimgfile2" id="ssimgfile2" />
I wan to check the size of file at the time of upload in javascript (its an image file so if possible want to check in kb or bytes or in px)
Is there any way i can do it.
Thanks in advance!
<input type="file" name="ssimgfile2" id="ssimgfile2" />
JavaScript natively cannot find any information about a file other than the name. I know with Windows you can create a File System Object by defining a new ActiveX Object like so:
var myFSO = new ActiveXObject("Scripting.FileSystemObject");
I would advise using a Server Side scripting language like ASP, ColdFusion, or PHP depending on what type of web server you have.