From 119a6950f0b3d756593775ad4c9c23b24c6f8adb Mon Sep 17 00:00:00 2001 From: Kavehhn174 Date: Wed, 19 Aug 2026 04:35:49 +0330 Subject: [PATCH] fix(uploader): resolve upload endpoint URL and update ImageUploader props in CreateProperty --- src/views/pages/Property/CreateProperty.vue | 12 +- src/views/uikit/ImageUploader.vue | 220 +++++++++++++++----- 2 files changed, 177 insertions(+), 55 deletions(-) diff --git a/src/views/pages/Property/CreateProperty.vue b/src/views/pages/Property/CreateProperty.vue index c44edfb..b25d48f 100644 --- a/src/views/pages/Property/CreateProperty.vue +++ b/src/views/pages/Property/CreateProperty.vue @@ -417,8 +417,12 @@ const saveProperty = async () => { isSaving.value = true; try { - property.value.mainImageUrls = mainImageUrlsWithData.value.map((x) => x.url); - property.value.documentUrls = documentUrlsWithData.value.map((x) => x.url); + property.value.mainImageUrls = (mainImageUrlsWithData.value || []) + .map((x) => (typeof x === 'string' ? x : x.url || x.source || '')) + .filter(Boolean); + property.value.documentUrls = (documentUrlsWithData.value || []) + .map((x) => (typeof x === 'string' ? x : x.url || x.source || '')) + .filter(Boolean); property.value.features = serializeFeaturesPayload(featuresValues.value); let status = 'failed'; @@ -857,7 +861,7 @@ const saveProperty = async () => { اسناد و مدارک تصویری / پی‌دی‌اف ملک - + @@ -895,7 +899,7 @@ const saveProperty = async () => { تصاویر ملک - + diff --git a/src/views/uikit/ImageUploader.vue b/src/views/uikit/ImageUploader.vue index 53271c2..1a8cb0e 100644 --- a/src/views/uikit/ImageUploader.vue +++ b/src/views/uikit/ImageUploader.vue @@ -1,42 +1,48 @@