From 440a3786ee295119c4083205e767609c2b3f9263 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 2 Mar 2015 15:21:23 +0100 Subject: [PATCH] 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 --- wcfsetup/install/files/acp/js/WCF.ACP.Style.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.20.1