MDL-72966 File upload: Uncaught Error from JS when uploading the file
This commit is contained in:
@@ -863,7 +863,8 @@ M.form_dndupload.init = function(Y, options) {
|
||||
*/
|
||||
notifyUploadCompleted: function() {
|
||||
require(['core_form/events'], function(FormEvent) {
|
||||
FormEvent.notifyUploadCompleted(this.filemanagerhelper.filemanager.get('id'));
|
||||
const elementId = this.filemanagerhelper ? this.filemanagerhelper.filemanager.get('id') : this.options.containerid;
|
||||
FormEvent.triggerUploadCompleted(elementId);
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
@@ -872,7 +873,8 @@ M.form_dndupload.init = function(Y, options) {
|
||||
*/
|
||||
notifyUploadStarted: function() {
|
||||
require(['core_form/events'], function(FormEvent) {
|
||||
FormEvent.notifyUploadStarted(this.filemanagerhelper.filemanager.get('id'));
|
||||
const elementId = this.filemanagerhelper ? this.filemanagerhelper.filemanager.get('id') : this.options.containerid;
|
||||
FormEvent.triggerUploadStarted(elementId);
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user