This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/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
..
adapters DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
components DEV: Add uploadHandler support to composer-upload-uppy mixin (#14692) 2021-10-26 11:22:33 +10:00
controllers DEV: Add new bookmarks:changed app event (#14674) 2021-10-22 09:38:02 +10:00
helpers A11Y: Fix several minor issues (#14436) 2021-09-24 11:52:07 -04:00
initializers FEATURE: Add fullscreen-tables to post (#14709) 2021-10-25 14:06:28 -05:00
lib DEV: removes jquery usage from time formatter (#14700) 2021-10-25 11:00:15 +02:00
mixins DEV: Add uploadHandler support to composer-upload-uppy mixin (#14692) 2021-10-26 11:22:33 +10:00
models FIX: Correct tracking context for some category routes (#14685) 2021-10-25 15:05:00 -04:00
pre-initializers DEV: prevents route nodes to leak on each test run (#14457) 2021-09-28 17:08:05 +02:00
raw-views A11Y: Fix several minor issues (#14436) 2021-09-24 11:52:07 -04:00
routes UX: Improve route hierarchy in for user-invites (#14583) 2021-10-12 17:39:47 +01:00
services DEV: Move loadLibs to explicit install message in media-optimization-worker (#14707) 2021-10-25 13:17:43 +10:00
styles DEV: Migrate to Ember CLI (#11932) 2021-02-03 14:22:20 -05:00
templates FEATURE: Add fullscreen-tables to post (#14709) 2021-10-25 14:06:28 -05:00
widgets UX: Add special case for user search when in a topic (#14669) 2021-10-21 10:34:50 -04:00
app.js DEV: uses forked Mousetrap to avoid leaking listeners (#14198) 2021-09-08 14:48:13 +02:00
index.html FIX: Ember CLI was always loading the admin payload in dev mode 2021-10-05 08:34:10 -04:00
mapping-router.js DEV: prevents route nodes to leak on each test run (#14457) 2021-09-28 17:08:05 +02:00