- No of files you can upload at a time
- Size of the file
- Extension of your uploading file
So, if you notice in select method we are getting all selected files in "e.files". Using that we can get all information of the selected files .
To cancel the selected files we are just writing the line "e.preventDefault();". After each e.preventDefault() I am writing "return false" that is because when the condition checking gets an error it just comes out of the function with one message. If we will remove that then it will alert all error messages then it will cancel the selected files.
So, now you can see what other information "e.files" and according to that you can implement your logic.