1
Answer

How to Validate size and type of file when select?

Rohan Ramani

Rohan Ramani

6y
554
1
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)