How are they? You will see I am doing a validation with jquery of uploading multiple files for which I have this in the html code:
<input type="file" name="name_imagen[]" multiple="multiple" id="name_imagen">
and this with jquery:
$(function(){
$("input[type='submit']").prop("disabled",true);
$("input[type='file']").bind('change',function(){
var a = 0;
var imageSize = $("#name_imagen").files.size;
var ext = $('#name_imagen').val().split('.').pop().toLowerCase();
for(var i = 0; i < imageSize; i ++){
var imageSize1 = imageSize.files[i].size;
if(imageSize1 > 1000000){
alert("Mayor a lo permitido");
}
}
});
});
When I try it, I get this error:
Uncaught TypeError: Can not read property 'size' of undefined
I do not know what I'm doing wrong. To this I want to add the validation by file extension.
Help please. Thanks