Problem description
The upload method doesn't support 'webkitdirectory' unless 'multiple' is also set to true. This is not the expected behaviour as selecting a single directory does not require 'multiple' to be set on the input.
Suggested solution
The upload method line 34 .slice(0, input.multiple ? undefined : 1) should be changed to .slice(0, input.multiple || input.webkitdirectory ? undefined : 1).
Additional context
No response