From b2c9ffe77d0a0fa52223d51ee598b353e5e7f6f1 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Thu, 7 Sep 2023 18:49:33 +0530 Subject: [PATCH 1/2] fix(llc): fix not able to upload attachmentFile without name. Signed-off-by: Sahil Kumar --- packages/stream_chat/lib/src/core/models/attachment_file.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/stream_chat/lib/src/core/models/attachment_file.dart b/packages/stream_chat/lib/src/core/models/attachment_file.dart index ee6690ca..73a428ea 100644 --- a/packages/stream_chat/lib/src/core/models/attachment_file.dart +++ b/packages/stream_chat/lib/src/core/models/attachment_file.dart @@ -74,13 +74,13 @@ class AttachmentFile { if (CurrentPlatform.isWeb) { multiPartFile = MultipartFile.fromBytes( bytes!, - filename: name, + filename: name ?? 'file', contentType: mimeType, ); } else { multiPartFile = await MultipartFile.fromFile( path!, - filename: name, + filename: name ?? 'file', contentType: mimeType, ); } From d0b8e90bb12af8882b8be626b59a818d99237b61 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Thu, 7 Sep 2023 18:51:18 +0530 Subject: [PATCH 2/2] chore: update CHANGELOG.md Signed-off-by: Sahil Kumar --- packages/stream_chat/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index cfe86802..ea029152 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -4,6 +4,8 @@ - [[#1716]](https://github.com/GetStream/stream-chat-flutter/issues/1716) Fixed client not able to update message with `type: reply`. +- [[#1724]](https://github.com/GetStream/stream-chat-flutter/issues/1724) Fixed sendFile error + on `AttachmentFile` with `bytes` and no `name`. ## 6.8.0