Rohan Ramani

Rohan Ramani

  • NA
  • 786
  • 138.4k

How to Validate size and type of file when select?

Sep 17 2018 5:34 AM
Hi,
 
I want to select and add files only office files like word excel powerpoint, and pdf and images like jpeg, png, gif form the input.
 
And also the size should be max 20 mb.
  1. <label class="btn btn-primary">  
  2. <input type="file" id="btnAtch" name="CollFiles" multiple/>  
  3. </label>  
In Script:
  1. <script>  
  2. $(document).ready(function () {  
  3. $('#btnAtch').change(function () {  
  4. });  
  5. </script>  
Don't know what have to do.. Please help

Answers (1)