From 1493c00edf41914a5d87abfcb615cb812507ad33 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sat, 5 Apr 2025 22:36:25 +0200 Subject: [PATCH] Fix: fix #2372 --- src/Logic/ImageProviders/ImageUploadManager.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Logic/ImageProviders/ImageUploadManager.ts b/src/Logic/ImageProviders/ImageUploadManager.ts index fafa909076..a58a3500fb 100644 --- a/src/Logic/ImageProviders/ImageUploadManager.ts +++ b/src/Logic/ImageProviders/ImageUploadManager.ts @@ -190,7 +190,7 @@ export class ImageUploadManager { } } try { - ;({ key, value, absoluteUrl } = await this._uploader.uploadImage( + ({ key, value, absoluteUrl } = await this._uploader.uploadImage( blob, location, author, @@ -200,7 +200,7 @@ export class ImageUploadManager { this.increaseCountFor(this._uploadRetried, featureId) console.error("Could not upload image, trying again:", e) try { - ;({ key, value, absoluteUrl } = await this._uploader.uploadImage( + ({ key, value, absoluteUrl } = await this._uploader.uploadImage( blob, location, author, @@ -222,9 +222,9 @@ export class ImageUploadManager { return undefined } } - console.log("Uploading image done, creating action for", featureId) + console.log("Uploading image done, creating action for", featureId, " targetkey is", targetKey, "key is", key) key = targetKey ?? key - if (targetKey) { + if (targetKey && targetKey.indexOf(key) < 0) { // This is a non-standard key, so we use the image link directly value = absoluteUrl }