From 820beccd86f266e671b71cb46a539aa5aea597ff Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 29 Dec 2016 07:49:58 +0100 Subject: [PATCH] Reset media listing before new upload, not after upload --- .../files/js/WoltLabSuite/Core/Media/Upload.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js index 0685432474..f62af58196 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js @@ -126,7 +126,6 @@ define( if (this._mediaManager) { this._mediaManager.setupMediaElement(media, file); - this._mediaManager.resetMedia(); this._mediaManager.addMedia(media, file); } } @@ -163,6 +162,18 @@ define( media: data.returnValues.media, upload: this }); + }, + + /** + * @see WoltLabSuite/Core/Upload#_uploadFiles + */ + _uploadFiles: function(files, blob) { + // reset media (search) before uploading + if (this._mediaManager) { + this._mediaManager.resetMedia(); + } + + return MediaUpload._super.prototype._getParameters.call(this, files, blob); } }); -- 2.20.1