javascript - Limit number files in jQuery-File-Upload -


i use plugin jquery-file-upload. how can limit of number selecting files local machine?

https://github.com/blueimp/jquery-file-upload/wiki/options

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/> 

see demo on fiddle here


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -