HI WELCOME TO KANSIRIS

Restrict File Upload Extensions

Leave a Comment

 

var ext = $(‘#my_file_field’).val().split(‘.’).pop().toLowerCase();
if($.inArray(ext, [‘gif’,’png’,’jpg’,’jpeg’]) == -1) {
alert(‘invalid extension!’);
}

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.