Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get size of a file using HTML 5

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 246
    Comment on it

    Hello Reader's! If you are looking for an HTML 5 validation which tell user the size of an file the code will help you:-

    In HTML fileL

    <input type="file" id="file" />
    

    In the JS file

    //binds to onchange event of your input field
    $('#file').bind('change', function() {
    
      //this.files[0].size gets the size of your file.
      alert(this.files[0].size);
    
    });
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: