From 24144b16d0eabd000cb25d42a7aeacce32c18f6f Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 22 Jun 2016 14:04:54 +0200 Subject: [PATCH] make sure that the preview gets updated every time a new image gets uploaded --- apps/theming/js/settings-admin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index cd650fc0ac..86c22471ad 100644 --- a/apps/theming/js/settings-admin.js +++ b/apps/theming/js/settings-admin.js @@ -40,11 +40,12 @@ function preview(setting, value) { if (setting === 'logoMime') { console.log(setting); var logos = document.getElementsByClassName('logo-icon'); + var timestamp = new Date().getTime(); if(value !== '') { - logos[0].style.background = "url('" + OC.generateUrl('/apps/theming/logo') + "')"; + logos[0].style.background = "url('" + OC.generateUrl('/apps/theming/logo') + "?v" + timestamp + "')"; logos[0].style.backgroundSize = "62px 34px"; } else { - logos[0].style.background = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg'+"')"; + logos[0].style.background = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg?v' + timestamp +"')"; logos[0].style.backgroundSize = "62px 34px"; } }