showing results for - "accept only video in input type file below size"
Maina
18 Apr 2017
1var uploadField = document.getElementById("file");
2
3uploadField.onchange = function() {
4	// 2097152 ~ 2MB
5    if(this.files[0].size > 2097152) {
6       alert("File is too big!");
7       this.value = "";
8    };
9};
10
similar questions