jquery - Count number of selected images on file upload -


this question has answer here:

<input type="file" name="images[]" class="upload" accept="image/*" multiple="multiple"/> 

now when choose i.e. 5 images, how can number jquery? when it's chosen, want write

5 images chosen.

demo

use files.length

$('input[type="file"]').change(function () {   console.log($(this)[0].files.length); }); 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -