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 }