jQuery-File-Upload
jQuery-File-Upload copied to clipboard
with "folder selection" (multiple directory webkitdirectory mozdirectory) it lists also directory items...
When configuring the file input field with "multiple directory webkitdirectory mozdirectory"
when i choose a directory, that have some files inside, and a subdirectory with even other files, it lists correctly all the files, but shows the subdirectory too, with 0 kb size.
why it does not filter it?
Thanks for help!


It seems that Chrome doesn't seem to populate the webkitEntries (or entries) property of the file input anymore on input onchange events: https://code.google.com/p/chromium/issues/detail?id=138987
Therefore all we have is a FileList, where we cannot detect if the given File object is a directory or a valid File. The list you get in your example is created by Chrome itself, so you might want to add your vote to the Chromium bug report or create a new one specific for this issue on the Chromium bug tracker.
If you never want to accept files with a file size of 0 you can also filter those from the list in your own application.
yes... is what i've done indeed :) Anyway thanks a lot (again) for the reply :)
i added, inside jquery.fileupload.js, in the "_onAdd" object
....
$.each(fileSet || files, function (index, element) {
if (element.size>0) {
....
:+1: