discourse/app/assets/javascripts
Martin Brennan e8a6079c29
FIX: Video thumbnail uploads interfering with subsequent uploads (#23216)
Short answer -- the problem is the video thumbnail generator & uploader
code added a couple of months back in f144c64e13.
It was implemented as another Mixin which overrides `this._uppyInstance`
when uploading the video thumbnail after the initial upload is complete,
which means the composer's `this._uppyInstance` value is overridden,
and it loses all of its preprocessors & upload code.

This is generally a problem with the Mixin based architecture that I
used for the Uppy code, which we need to remove at some point and
refacotr.

The most ideal thing to do here would be to convert this video thumbnail
code into an Uppy
[postprocessor](https://uppy.io/docs/uppy/#addpostprocessorfn) plugin,
which runs on each upload after they are complete. I started looking
into this, and the main hurdle here is adding support to tracking the
progress of postprocessors to
[ExtendableUploader](cf42466dea/app/assets/javascripts/discourse/app/mixins/extendable-uploader.js)
so that is out of scope at this time.

The fix here makes it so the ComposerVideoThumbnailUppy code is no
longer a Mixin, but acts more like a normal class, a pattern which
we have used in chat. I also clean up a lot of the thumbnail uploader
code and remove some unnecessary things.

Attempted to add a system spec, but video streaming does not work
in Chrome for Testing at this time, and it is needed for the
onloadedmetadata event.
2023-08-24 14:04:26 +10:00
..
admin DEV: Tighten up fuzzy search site setting results (#23176) 2023-08-21 19:04:57 -06:00
bootstrap-json DEV: Fix ember-cli proxy assets (#22674) 2023-08-01 18:43:33 +01:00
confirm-new-email
deprecation-silencer DEV: move deprecation silencer to a shared package (#22668) 2023-07-18 19:07:20 +01:00
dialog-holder Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157) 2023-08-21 11:27:24 +02:00
discourse FIX: Video thumbnail uploads interfering with subsequent uploads (#23216) 2023-08-24 14:04:26 +10:00
discourse-common DEV: Use object spread instead of `Object.assign({}, …)` (#23167) 2023-08-21 14:28:16 +02:00
discourse-hbr Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157) 2023-08-21 11:27:24 +02:00
discourse-plugins DEV: Ensure plugin raw connectors are transpiled to `/raw-templates` (#23170) 2023-08-21 19:24:49 +01:00
discourse-widget-hbs Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157) 2023-08-21 11:27:24 +02:00
docs
ember-addons
ember-cli-progress-ci
ember-production-deprecations DEV: Clean up package.json files (#22349) 2023-06-30 13:01:45 +02:00
locales
patches DEV: Update ember-cli to 5.0.0 (#22280) 2023-06-26 17:15:59 +02:00
pretty-text Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157) 2023-08-21 11:27:24 +02:00
select-kit DEV: Use object spread instead of `Object.assign({}, …)` (#23167) 2023-08-21 14:28:16 +02:00
truth-helpers Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157) 2023-08-21 11:27:24 +02:00
wizard DEV: Update `replaceWith` on Route (#23153) 2023-08-21 16:53:54 -05:00
.licensee.json DEV: Update sub-dependencies (#22325) 2023-06-29 17:08:33 +02:00
.npmrc
discourse-js-processor.js
handlebars-shim.js
package.json Build(deps-dev): Bump patch-package in /app/assets/javascripts (#22844) 2023-07-28 00:58:36 +02:00
polyfills.js
service-worker.js.erb FIX: Ensure service-worker cache is cleaned correctly (#23204) 2023-08-23 13:58:32 +01:00
yarn.lock Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157) 2023-08-21 11:27:24 +02:00