Skip to content

A platform for community discussion. Free, open, simple.

DEV: Use pushObject for inProgressUploads in uppy (#15134)

Martin Brennan7e5f52a163c1
diff --git a/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js b/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js
index dfd8efd160f..f9247eadc69 100644
--- a/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js
+++ b/app/assets/javascripts/discourse/app/mixins/composer-upload-uppy.js
@@ -263,7 +263,10 @@ export default Mixin.create(ExtendableUploader, UppyS3Multipart, {
});
files.forEach((file) => {
- this.inProgressUploads.push(
+ // The inProgressUploads is meant to be used to display these uploads
+ // in a UI, and Ember will only update the array in the UI if pushObject
+ // is used to notify it.
+ this.inProgressUploads.pushObject(
EmberObject.create({
fileName: file.name,
id: file.id,