fix(blogPost): update without image

This commit is contained in:
mso7nueh
2025-06-05 17:36:15 +03:00
parent cacfaff4cf
commit 0b2464ea19
4 changed files with 9 additions and 7 deletions

View File

@@ -73,7 +73,7 @@ class BlogPostRepository {
'video_url': videoUrl,
'image': image != null
? await MultipartFile.fromFile((await ImageCompressUtility.compressFile(File(image.path))).path, filename: image.name)
: oldImageUrl != null
: oldImageUrl != '' && oldImageUrl != null
? await MultipartFile.fromFile((await downloadImage(oldImageUrl))?.path ?? '', filename: oldImageUrl.split('/').last)
: null,
});