From 401e362298ea97665c7ede2ed469a719f99bb88b Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 11 Sep 2019 15:20:19 +0200 Subject: [PATCH] Remove the image from tinyMce cache, otherwise we can't handle if we upload the exactly same image twice --- .../src/common/services/tinymce.service.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 3bbcdbf73e..92a2389054 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -223,6 +223,10 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s // When its being persisted in RTE property editor // To create a media item & delete this tmp one etc tinymce.activeEditor.$(img).attr({ "data-tmpimg": tmpLocation }); + + // We need to remove the image from the cache, otherwise we can't handle if we upload the exactly + // same image twice + tinymce.activeEditor.editorUpload.blobCache.removeByUri(imgSrc); }); }); }