discourse/app
Martin Brennan f6528afa01
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
was doing `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
were working.
2021-10-26 11:22:33 +10:00
..
assets DEV: Add uploadHandler support to composer-upload-uppy mixin (#14692) 2021-10-26 11:22:33 +10:00
controllers FIX: Include the Vary:Accept header on all Accept-based responses (#14647) 2021-10-25 12:53:50 +01:00
helpers DEV: Allow actions to change the manifest endpoint (#14522) 2021-10-06 15:41:52 -05:00
jobs SECURITY: Improve validation of SNS subscription confirm (#14671) 2021-10-20 22:20:52 +01:00
mailers FIX: Do not show recipient user in email participants list (#14642) 2021-10-19 15:26:22 +10:00
models FIX: Remove superfluous topic allowed users on group invite (#14656) 2021-10-22 08:57:51 +10:00
serializers DEV: Remove code that is no longer valid. (#14657) 2021-10-21 10:47:22 +08:00
services FEATURE: Change all core to use uppy-image-uploader (#14428) 2021-10-19 13:25:42 +10:00
views FIX: improvements for download local dates (#14588) 2021-10-14 09:22:44 +11:00