From: Alexander Ebert Date: Mon, 2 Mar 2015 14:21:23 +0000 (+0100) Subject: Uploading a logo/preview image didn't cause the displayed image to be refreshed becau... X-Git-Tag: 2.1.1~21 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=440a3786ee295119c4083205e767609c2b3f9263;p=GitHub%2FWoltLab%2FWCF.git Uploading a logo/preview image didn't cause the displayed image to be refreshed because it replaces the existing image, causing the old image to be still cached --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.Style.js b/wcfsetup/install/files/acp/js/WCF.ACP.Style.js index 4619bbe57b..1285d70367 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.Style.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.Style.js @@ -131,7 +131,7 @@ WCF.ACP.Style.ImageUpload = WCF.Upload.extend({ _success: function(uploadID, data) { if (data.returnValues.url) { // show image - this._image.attr('src', data.returnValues.url); + this._image.attr('src', data.returnValues.url + '?timestamp=' + Date.now()); // hide error this._button.next('.innerError').remove(); @@ -249,7 +249,7 @@ WCF.ACP.Style.LogoUpload = WCF.Upload.extend({ $src = $('#logo > a > img').prop('src'); } - this._image.attr('src', $src); + this._image.attr('src', $src + '?timestamp=' + Date.now()); }, /** @@ -274,7 +274,7 @@ WCF.ACP.Style.LogoUpload = WCF.Upload.extend({ _success: function(uploadID, data) { if (data.returnValues.url) { // show image - this._image.attr('src', data.returnValues.url); + this._image.attr('src', data.returnValues.url + '?timestamp=' + Date.now()); this._pageLogo.val(data.returnValues.url); // hide error