Return to Snippet

Revision: 48887
at July 12, 2011 17:17 by erraja_07


Initial Code
/*
*
* Function to validate File size
*
**/
 function findSize(field_id)
 {
           var fileInput = $("#"+field_id)[0];
           byteSize  = fileInput.files[0].fileSize;
        return ( Math.ceil(byteSize / 1024) ); // Size returned in KB.
}

Initial URL

                                

Initial Description
File size validation

Initial Title
JQuery -  Get Uploaded File size - File size validation

Initial Tags
file, validation

Initial Language
jQuery