From: Matthias Schmidt Date: Thu, 29 Dec 2016 06:49:58 +0000 (+0100) Subject: Reset media listing before new upload, not after upload X-Git-Tag: 3.0.0_RC_3~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=820beccd86f266e671b71cb46a539aa5aea597ff;p=GitHub%2FWoltLab%2FWCF.git Reset media listing before new upload, not after upload --- 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); } });