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 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, ); }