DEV: Add uploadHandler support to composer-upload-uppy mixin (#14692)
This commit adds uploadHandler support to composer uploads using uppy. The only things we have that are using this are discourse-brightcove and discourse-video, which both pop modal windows to handle the file upload and completely leave out all the composer-type flows. This implementation simply follows the existing one, where if a single file is uploaded and there is a matching upload handler we take control away from uppy and hand it off to the upload handler.
Trying to get this kind of thing working within uppy would require a few changes because they have no way to restrict uploaders to certain file types and with the way their uploaders are run it doesn’t look like it would be easy to add this either, so I don’t think this is worth the work unless at some point in the future we plan to have more upload handler integrations.
I also fixed an issue with
cleanUpComposerUploadHandler which is used
in tests to reset the state of
uploadHandlers in the composer. This
uploadHandlers =  to clear that array, but that creates
a brand new array so anything else referencing the original array will
lose that reference. Better to set
uploadHandlers.length = 0 to
clear it. This was breaking the tests I added to see if upload handlers
GitHub sha: f6528afa019ded81012947efdf2835324488183b