This commit is contained in:
Pieter Vander Vennet 2025-04-05 22:36:25 +02:00
parent e56e8fe112
commit 1493c00edf

View file

@ -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
}