DEV: Fix uploadHandler impl. in composer-upload-uppy mixin (PR #15105)

In f6528afa019ded81012947efdf2835324488183b I added parity support for composer upload handlers to the uppy-ized composer. However the way I assumed that it was only possible to handle a single file upload at a time was false; it only appeared this way in the old jQuery file upload composer because jQuery file upload sent through files one at a time even if multiple were added at once. This caused issues in certain plugins and themes by third parties.

This commit fixes the issue by making the uppy upload handler work the same as the old one, by capturing all of the added files that have matching handlers then going through them one by one and passing them to the handler function.


See Uppy uploader breaking with multiple files drop onto composer - bug - Discourse Meta

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

You could do the same nice destructuring here like you did on line 151 :slightly_smiling_face:

How does my brain do this thing where it remembers a language feature 10 lines up but not here? :brain: :-1: