From 60822404e51d04e8c182951359b40a8b32c4b203 Mon Sep 17 00:00:00 2001 From: Awais Jibran Date: Wed, 2 Sep 2020 17:51:40 +0500 Subject: [PATCH] Fix video handouts uploads. --- cms/static/js/views/uploads.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/static/js/views/uploads.js b/cms/static/js/views/uploads.js index c71d5bf060..2e4ec671e7 100644 --- a/cms/static/js/views/uploads.js +++ b/cms/static/js/views/uploads.js @@ -33,7 +33,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal', 'edx-ui renderContents: function() { var isValid = this.model.isValid(), selectedFile = this.model.get('selectedFile'), - oldInput = this.$('input[type=file]').get(0); + oldInput = this.$('input[type=file]'); BaseModal.prototype.renderContents.call(this); // Ideally, we'd like to tell the browser to pre-populate the // with the selectedFile if we have one -- but @@ -44,7 +44,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal', 'edx-ui // a blank input to prompt the user to upload a different (valid) file. if (selectedFile && isValid) { $(oldInput).removeClass('error'); - this.$('input[type=file]').replaceWith(HtmlUtils.ensureHtml(oldInput).toString()); + this.$('input[type=file]').replaceWith(HtmlUtils.HTML(oldInput).toString()); this.$('.action-upload').removeClass('disabled'); } else { this.$('.action-upload').addClass('disabled');