javascript - Limit number files in jQuery-File-Upload -
i use plugin jquery-file-upload. how can limit of number selecting files local machine?
you can limit number of files before submitting adding onchange event input element. it's triggered check number of files. here simple example 2 file limit:
<input type="file" onchange="if(parseint($(this).get(0).files.length)>2) alert('you can upload maximum of 2 files'); else alert('you within limit');" multiple/>
Comments
Post a Comment